資源簡介
使用java gui ,后臺使用mysql數據庫連接的汽車零件庫存管理系統。
代碼片段和文件信息
package?boundary;
import?java.awt.event.ActionEvent;
import?java.awt.event.ActionListener;
import?javax.swing.JButton;
import?javax.swing.Jframe;
import?javax.swing.JLabel;
import?javax.swing.JTextField;
import?DB.CarPartDao;
import?entity.CarPart;
public?class?AddCarUI?extends?Jframe{
JLabel?ad?=?new?JLabel(“新零件增添“);
JLabel?nid?=?new?JLabel(“?ID??:“);
JLabel?nname?=?new?JLabel(“名?????????稱:“);
JLabel?npd?=?new?JLabel(“增添日期:“);
JLabel?nsp?=?new?JLabel(“來?????????源:“);
JLabel?nquan?=?new??JLabel(“數?????????量:“);
JTextField?nidx?=?new?JTextField();
JTextField?nnamex?=?new?JTextField();
JTextField?nnpdx?=?new?JTextField();
JTextField?nspx?=?new?JTextField();
JTextField?nquanx?=?new?JTextField();?
JButton?add?=?new?JButton(“增??????????添“);
JButton?back?=?new?JButton(“返回菜單“);
public?AddCarUI()?{
super();
initAddCarUI();
}
private?void?initAddCarUI()?{
this.setLayout(null);
this.setBounds(300200300300);
this.setVisible(true);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
this.setResizable(false);
ad.setBounds(12507520);
nid.setBounds(30257525);
nidx.setBounds(952517025);
nname.setBounds(30607525);
nnamex.setBounds(956017025);
npd.setBounds(30957525);
nnpdx.setBounds(959517025);
nquan.setBounds(301307525);
nquanx.setBounds(9513017025);
nsp.setBounds(301657525);
nspx.setBounds(9516517025);
add.setBounds(30?200?90?35);
back.setBounds(170?200?95?35);
this.add(ad);
this.add(add);
this.add(back);
this.add(nid);
this.add(nidx);
this.add(nname);
this.add(nnamex);
this.add(nnpdx);
this.add(npd);
this.add(nsp);
this.add(nspx);
this.add(nquan);
this.add(nquanx);
add.addActionListener(new?ActionListener()?{
@Override
public?void?actionPerformed(ActionEvent?e)?{
//?TODO?Auto-generated?method?stub
CarPartDao?ud?=new?CarPartDao();
boolean?flag=?ud.addCarPart(new?CarPart(Integer.parseInt(nidx.getText())nnamex.getText()Integer.parseInt(nnpdx.getText())0Integer.parseInt(nquanx.getText())nspx.getText()“未出庫“));
if(flag){
System.out.println(“初始化成功“);
}else{
System.out.println(“初始化失敗“);
}
}
});
back.addActionListener(new?ActionListener()?{
@Override
public?void?actionPerformed(ActionEvent?e)?{
//?TODO?Auto-generated?method?stub
new?MainUI();
?setVisible(false);
}
});
}
/* public?static?void?main(String[]?args)?{
new?AddCarUI();
}*/
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-01-07?14:35??car\
?????目錄???????????0??2018-01-04?14:38??car\.me
?????文件???????????0??2018-01-04?14:38??car\.me
?????文件???????78823??2018-01-12?08:25??car\.me
?????目錄???????????0??2018-01-06?14:39??car\.me
?????目錄???????????0??2018-01-04?14:38??car\.me
?????文件??????????71??2018-01-04?14:38??car\.me
?????文件???????????0??2018-01-04?14:38??car\.me
?????文件?????????235??2018-01-06?14:18??car\.me
?????目錄???????????0??2018-01-04?14:38??car\.me
?????文件?????????561??2018-01-04?14:40??car\.me
?????文件?????????235??2018-01-06?14:39??car\.me
?????目錄???????????0??2018-01-10?09:51??car\.me
?????目錄???????????0??2018-01-04?14:39??car\.me
?????目錄???????????0??2018-01-12?10:20??car\.me
?????目錄???????????0??2018-01-11?23:08??car\.me
?????目錄???????????0??2018-01-11?09:23??car\.me
?????文件????????4019??2018-01-07?18:39??car\.me
?????文件????????1953??2018-01-09?11:13??car\.me
?????文件????????1150??2018-01-10?09:05??car\.me
?????文件????????4018??2018-01-07?18:36??car\.me
?????文件????????5718??2018-01-10?16:49??car\.me
?????文件????????2139??2018-01-11?09:23??car\.me
?????目錄???????????0??2018-01-09?09:56??car\.me
?????目錄???????????0??2018-01-10?11:41??car\.me
?????文件????????2378??2018-01-10?11:34??car\.me
?????文件?????????621??2018-01-09?14:28??car\.me
?????文件????????4884??2018-01-09?09:26??car\.me
?????目錄???????????0??2018-01-09?11:02??car\.me
?????文件??????????43??2018-01-09?11:02??car\.me
?????目錄???????????0??2018-01-11?08:57??car\.me
............此處省略1049個文件信息
- 上一篇:Java mysql 服裝進銷存管理系統
- 下一篇:android反編譯工具集合
評論
共有 條評論