📄 sellwindows.java
字号:
/**
* This method initializes kucun
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getKucun() {
if (kucun == null) {
kucun = new JMenuItem();
kucun.setText("查看库存信息");
kucun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
LookUp lp = new LookUp("库存");
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return kucun;
}
/**
* This method initializes user
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getUser() {
if (user == null) {
user = new JMenuItem();
user.setText("重建用户");
user.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Insure in = new Insure(frame);
}
});
}
return user;
}
/**
* This method initializes exit
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getExit() {
if (exit == null) {
exit = new JMenuItem();
exit.setText("退出系统");
exit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
System.exit(0);
}
});
}
return exit;
}
/**
* This method initializes tableout
*
* @return javax.swing.JMenu
*/
private JMenu getTableout() {
if (tableout == null) {
tableout = new JMenu();
tableout.setText("导出");
tableout.add(getOutkucun());
tableout.add(getOutb_inf());
}
return tableout;
}
/**
* This method initializes softhelp
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getSofthelp() {
if (softhelp == null) {
softhelp = new JMenuItem();
softhelp.setText("帮助");
softhelp.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
Softhelp so = new Softhelp(frame);
}
});
}
return softhelp;
}
/**
* This method initializes about
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getAbout() {
if (about == null) {
about = new JMenuItem();
about.setText("关于");
about.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
About ab = new About(frame);
}
});
}
return about;
}
/**
* This method initializes localize
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getLocalize() {
if (localize == null) {
localize = new JMenuItem();
localize.setText("销售系统");
localize.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
frame.setVisible(false);
SellWindows se = new SellWindows();
}
});
}
return localize;
}
/**
* This method initializes queshu
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getQueshu() {
if (queshu == null) {
queshu = new JMenuItem();
queshu.setText("查看缺书信息");
queshu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
LookUp lp = new LookUp("缺书");
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return queshu;
}
/**
* This method initializes dingshu
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getDingshu() {
if (dingshu == null) {
dingshu = new JMenuItem();
dingshu.setText("查看订书信息");
dingshu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
LookUp lp = new LookUp("订_inf");
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return dingshu;
}
/**
* This method initializes b_inf
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getB_inf() {
if (b_inf == null) {
b_inf = new JMenuItem();
b_inf.setText("查看一览表");
b_inf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
LookUp lp = new LookUp("书_inf");
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return b_inf;
}
/**
* This method initializes outkucun
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getOutkucun() {
if (outkucun == null) {
outkucun = new JMenuItem();
outkucun.setText("导出库存表");
outkucun.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
Db_excel ex = new Db_excel("库存");
} catch (RowsExceededException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (WriteException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (IOException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return outkucun;
}
/**
* This method initializes outb_inf
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getOutb_inf() {
if (outb_inf == null) {
outb_inf = new JMenuItem();
outb_inf.setText("导出一览表");
outb_inf.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
Db_excel ex = new Db_excel("书_inf");
} catch (RowsExceededException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (WriteException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (SQLException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
} catch (IOException e1) {
// TODO 自动生成 catch 块
e1.printStackTrace();
}
}
});
}
return outb_inf;
}
/**
* This method initializes Utable
*
* @return javax.swing.JMenu
*/
private JMenu getUtable() {
if (Utable == null) {
Utable = new JMenu();
Utable.setText("\u64cd\u4f5c\u4e00\u89c8\u8868");
Utable.add(getBinsert());
Utable.add(getBupdate());
Utable.add(getBdelete());
}
return Utable;
}
/**
* This method initializes binsert
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getBinsert() {
if (binsert == null) {
binsert = new JMenuItem();
binsert.setText("\u63d2\u5165");
binsert.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
YNPoint yn = new YNPoint(frame,"insert");
}
});
}
return binsert;
}
/**
* This method initializes bupdate
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getBupdate() {
if (bupdate == null) {
bupdate = new JMenuItem();
bupdate.setText("\u4fee\u6539");
bupdate.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
YNPoint yn = new YNPoint(frame, "update");
}
});
}
return bupdate;
}
/**
* This method initializes bdelete
*
* @return javax.swing.JMenuItem
*/
private JMenuItem getBdelete() {
if (bdelete == null) {
bdelete = new JMenuItem();
bdelete.setText("\u5220\u9664");
bdelete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
YNPoint yn = new YNPoint(frame,"delete");
}
});
}
return bdelete;
}
/**
* This method initializes jButton2
*
* @return javax.swing.JButton
*/
private JButton getJButton2() {
if (jButton2 == null) {
jButton2 = new JButton();
jButton2.setBounds(new Rectangle(150, 133, 61, 34));
jButton2.setText("完成");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent e) {
try {
Finish fi = new Finish(jTextField2.getText());
} catch (RowsExceededException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (WriteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (ClassNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
});
}
return jButton2;
}
} // @jve:decl-index=0:visual-constraint="275,16"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -