📄 win1.java
字号:
catch (Exception e) {
// TODO Auto-generated catch block
System.out.print("数据库恢复错误");
}
}
});
// 系统管理
per++;
帮助说明.setBounds(0, 0, 724, 468);
帮助说明.setLayout(null);
getContentPane().add(帮助说明);
index.setVisible(true);
图书查询.setVisible(false);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
button_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q1 == 0) {
PWWindow askWindow = new PWWindow();
askWindow.setVisible(true);
q1 = 1;
}
}
});
final JButton button_s = new JButton();
button_s.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
index.setVisible(true);
图书查询.setVisible(false);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
}
});
per++;
button_s.setText("回到主界面");
button_s.setBounds(525, 226, 99, 23);
intro.add(button_s);
final JButton button_a = new JButton();
button_a.setBounds(525, 106, 99, 23);
intro.add(button_a);
button_a.setText("图书出库");
button_a.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Calculator c;
int c1=0;
int c2=0;
int c3=0;
try
{
c1=Integer.parseInt(textField.getText());
c2=Integer.parseInt(textField_1.getText());
}
catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "输入有误,请重新输入");
textField.setText("");
textField_1.setText("");
c3=1;
}
if(c3==0)
{
try {
c = (Calculator)
Naming.lookup(
"rmi://localhost/CalculatorService");
String[] d=c.outbook(c1,c2);
textArea.setText(d[0]);
textArea_2.setText(d[1]);
textArea_9.setText(d[2]);
textArea_3.setText(d[3]);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotBoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}});
per++;
button_1_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Calculator c;
int c1=0;
int c2=0;
int c3=0;
try
{
c1=Integer.parseInt(textField_3.getText());
}
catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "输入有误,请重新输入");
textField_3.setText("");
c3=1;
}
if(c3==0)
{
try {
c = (Calculator)
Naming.lookup(
"rmi://localhost/CalculatorService");
System.out.print("dfgfgdfg");
System.out.print(c1);
String[] d=c.inbook(c1);
textArea_1.setText(d[0]);
textArea_4.setText(d[1]);
textArea_5.setText(d[2]);
textArea_6.setText(d[3]);
textArea_8.setText(d[4]);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotBoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}});
per++;
final JButton button_3_1 = new JButton();
button_3_1.setText("回到主界面");
button_3_1.setBounds(525, 226, 99, 23);
button_3_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
index.setVisible(true);
图书查询.setVisible(false);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
}
});
button_1gll.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
index.setVisible(true);
图书查询.setVisible(false);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
}
});
button_2gl.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
index.setVisible(true);
图书查询.setVisible(false);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
}
});
insert.add(button_3_1);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
index.setVisible(false);
图书查询.setVisible(true);
图书流通.setVisible(false);
系统管理.setVisible(false);
帮助说明.setVisible(false);
}
});
per++;
button_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q1 == 0) {
PW1Window askWindow = new PW1Window();
askWindow.setVisible(true);
q1 = 1;
}
}
});
/*
* button_2.addActionListener(new ActionListener() { public void
* actionPerformed(ActionEvent arg0) { if(pw==1){
* index.setVisible(false); 图书查询.setVisible(false);
* 图书流通.setVisible(true); 系统管理.setVisible(false);
* 帮助说明.setVisible(false); pw=0;} else { index.setVisible(true);
* 图书查询.setVisible(false); 图书流通.setVisible(false);
* 系统管理.setVisible(false); 帮助说明.setVisible(false); } } });
*/
button_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Help frame = new Help();
frame.setVisible(true);
}
});
button_d.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q2 == 0) {
ConfirmWindow askWindow = new ConfirmWindow();
askWindow.setVisible(true);
q2 = 1;
}
}
});
// button_d.addActionListener(new ActionListener() {
// public void actionPerformed(ActionEvent arg0) {
// ConfirmWindow askWindow = new ConfirmWindow();
// askWindow.setVisible(true);
//
// }
// });
per++;
button_3gl.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q2 == 0) {
ConfirmWindow askWindow = new ConfirmWindow();
askWindow.setVisible(true);
q2 = 1;
}
}
});
buttongll.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q2 == 0) {
ConfirmWindow askWindow = new ConfirmWindow();
askWindow.setVisible(true);
q2 = 1;
}
}
});
per++;
final JPanel panel_2 = new JPanel();
panel_2.setBorder(new BevelBorder(BevelBorder.LOWERED));
panel_2.setLayout(null);
panel_2.setBounds(0, 0, 184, 442);
系统管理.add(panel_2);
final JButton button_7x = new JButton();
button_7x.setBounds(0, 0, 120, 30);
panel_2.add(button_7x);
button_7x.setText("锁定屏幕");
final JToggleButton button_1x = new JToggleButton();
button_1x.setBounds(0, 0, 120, 30);
panel_2.add(button_1x);
button_1x.setText("读者库操作");
final JToggleButton button_2x = new JToggleButton();
button_2x.setBounds(0, 0, 120, 30);
panel_2.add(button_2x);
button_2x.setText("数据统计");
final JToggleButton button_4x = new JToggleButton();
button_4x.setBounds(0, 0, 120, 30);
panel_2.add(button_4x);
button_4x.setText("数据备份");
per++;
final JToggleButton button_3x = new JToggleButton();
button_3x.setBounds(0, 0, 120, 30);
panel_2.add(button_3x);
button_3x.setText("系统设置");
final JToggleButton button_5x = new JToggleButton();
button_5x.setBounds(0, 0, 120, 30);
panel_2.add(button_5x);
button_5x.setText("数据恢复");
final JToggleButton button_6x = new JToggleButton();
button_6x.setBounds(0, 0, 120, 30);
panel_2.add(button_6x);
per++;
button_6x.setText("口令更改");
final JButton button_8x = new JButton();
button_8x.setBounds(0, 0, 120, 30);
panel_2.add(button_8x);
button_8x.setText("返回主界面");
final JButton button_9x = new JButton();
button_9x.setBounds(0, 0, 120, 30);
panel_2.add(button_9x);
button_9x.setText("退出系统");
final JToggleButton buttonx = new JToggleButton();
buttonx.setBounds(0, 0, 120, 30);
panel_2.add(buttonx);
buttonx.setSelected(true);
buttonx.setText("图书库操作");
buttonx.setBounds(40, 46, 99, 23);
button_1x.setBounds(40, 75, 99, 23);
button_2x.setBounds(40, 104, 99, 23);
button_3x.setBounds(40, 133, 99, 23);
button_4x.setBounds(40, 162, 99, 23);
button_5x.setBounds(40, 191, 99, 23);
button_6x.setBounds(40, 220, 99, 23);
button_7x.setBounds(40, 278, 99, 23);
button_8x.setBounds(40, 307, 99, 23);
button_9x.setBounds(40, 336, 99, 23);
per++;
button_9x.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
if (q2 == 0) {
ConfirmWindow askWindow = new ConfirmWindow();
askWindow.setVisible(true);
q2 = 1;
}
}
});
per++;
button_10.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Calculator c;
int c1=0;
int c2=0;
int c3=0;
try
{
c1=Integer.parseInt(textField11.getText());
}
catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "输入有误,请重新输入");
textField11.setText("");
c3=1;
}
if(c3==0)
{
try {
c = (Calculator)
Naming.lookup(
"rmi://localhost/CalculatorService");
String[] d=c.book(0,c1);
textField11.setText(d[0]);
textField_212.setText(d[1]);
textField_313.setText(d[2]);
textField_414.setText(d[3]);
textField_515.setText(d[4]);
textField_616.setText(d[5]);
textField_717.setText(d[6]);
textField_818.setText(d[7]);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotBoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
per++;
button_101.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Calculator c;
int c1=0;
int c2=0;
int c3=0;
try
{
c1=Integer.parseInt(textField_221.getText());
}
catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "输入有误,请重新输入");
textField_221.setText("");
c3=1;
}
if(c3==0)
{
try {
c = (Calculator)
Naming.lookup(
"rmi://localhost/CalculatorService");
String[] d=c.reader(0,c1);
textField_221.setText(d[0]);
textField_322.setText(d[1]);
textField_423.setText(d[2]);
textField_524.setText(d[3]);
textField_625.setText(d[4]);
textField_726.setText(d[5]);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NotBoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
per++;
button_14.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
Calculator c;
int c1=0;
int c2=0;
int c3=0;
try
{
c1=Integer.parseInt(textField11.getText());
}
catch (Exception e) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(null, "输入有误,请重新输入");
textField11.setText("");
c3=1;
}
if(c3==0)
{
try {
c = (Calculator)
Naming.lookup(
"rmi://localhost/CalculatorService");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -