1、Java固定资产管理系统源代码;import public class user_land extends JFrame implements ActionListener static Connection conn=null; static Statement stat=null; static ResultSet rs=null; static String url=jdbc:; static String user=sa; static String password=; JPanel p1,p2,p3,p4,p5; JLabel lbl1,lbl2,lbl3,lbl4; JTextF
2、ield txt_name; JPasswordField txt_pwd; JButton btn1,btn2,btn3; static try (); catch(Exception e) 加载驱动失败); (); public user_land() (固定资产及设备用户登录); p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); p5=new JPanel(); lbl1=new JLabel(欢迎登录); lbl2=new JLabel(用户名:); lbl3=new JLabel(密 码:); lb
3、l4=new JLabel(); txt_name=new JTextField(10); txt_pwd=new JPasswordField(10); btn1=new JButton(登录); btn2=new JButton(清空); btn3=new JButton(退出); (lbl1); (lbl2); (txt_name); (lbl3); (txt_pwd); (btn1); (btn2); (btn3); (lbl4); (new GridLayout(5,1); (p1); (p2); (p3); (p4); (p5); (400, 300, 400, 300); (EX
4、IT_ON_CLOSE); (true); quals()=true)&().equals()=false) (登录失败,用户名不能为空); if().equals()=false)&().equals()=true) (登录失败,密码不能为空); if().equals()=true)&().equals()=true) (登录失败,用户名/密码不能为空); if(is_Property() new Sys_interface().show(); else if().equals()=false)&().equals()=false) (登录失败,用户名/密码错误); ); (this);
5、how(); ); (this); (new ActionListener() Override public void actionPerformed(ActionEvent arg0) new user_land().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) new Pass_word().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) (0); ); ( new Actio
6、nListener() public void actionPerformed(ActionEvent e) new loan_prop_manage().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) new property_Info().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) new prop_info_select().show(); ); ( new ActionLi
7、stener() public void actionPerformed(ActionEvent e) new Loan_prop_select().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) new back_prop_select ().show(); ); ( new ActionListener() public void actionPerformed(ActionEvent e) new about().show(); ); (200,200,500,400); (EXIT
8、_ON_CLOSE); public void actionPerformed(ActionEvent e) how(); ; import import import .*; import import .*; import import import import import import import import import import public class loan_prop_manage extends JFrame implements ActionListener Vector data=null; DefaultTableModel model = null; Co
9、nnection conn=null; Statement stat=null; ResultSet rs1=null; JTable loan_prop=null; JLabel label; JTextField text; JTextField txt01,txt02,txt03,txt04,txt05,txt06; JPanel p1=null,p2=null,p3=null,p4,p5,p6,p7,p8,p9,p10; Choice c1=null,c2=null; JLabel lb1=null,lb2=null,lb3=null,lb4=null,lb5=null,lb6=nul
10、l; JButton btn_ok=null; JButton btn_exit=null; JButton btn_fresh=null; JButton btn_save=null; JButton btn_del=null; Vector columnName=new Vector(); public loan_prop_manage() text=new JTextField(); (资产编号); (资产名称); (资产型号); (借出时间); (借出数量); (借出人); p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=ne
11、w JPanel(); p5=new JPanel(); p6=new JPanel(); p7=new JPanel(); p8=new JPanel(); p9=new JPanel(); p10=new JPanel(); lb1=new JLabel(资产编号); lb2=new JLabel(资产名称); lb3=new JLabel(资产型号); lb4=new JLabel(借出时间); lb5=new JLabel(借出数量); lb6=new JLabel(借 出 人); txt01=new JTextField(8); txt02=new JTextField(8); tx
12、t03=new JTextField(8); txt04=new JTextField(8); txt05=new JTextField(8); txt06=new JTextField(8); c1=new Choice(); c2=new Choice(); text=new JTextField(5); (资产编号); (=); btn_ok=new JButton(确定); btn_exit=new JButton(退出); btn_fresh=new JButton(刷新); btn_save=new JButton(保存); btn_del=new JButton(删除); (ne
13、w JLabel(查询字段); (c1); (new JLabel(运算符); (c2); (new JLabel(输入数据); (text); (btn_ok); (btn_exit); (请操作); (lb1); (txt01); (lb2); (txt02); (lb3); (txt03); (lb4); (txt04); (lb5); (txt05); (lb6); (txt06); (btn_fresh); (btn_save); (btn_del); (new GridLayout(3, 2); (p3); (p4); (p5); (p6); (p7); (p8); loan_pr
14、op=new JTable(),columnName); model = new DefaultTableModel(getDate(),columnName); (new JScrollPane(loan_prop); (new GridLayout(4, 1); (p1); (p9); (p2); (p10); (400,300,500,400); (EXIT_ON_CLOSE); (资产借出管理); (new ActionListener() public void actionPerformed(ActionEvent arg0) try (); conn=(jdbc:,sa,); s
15、tat=(); String sql=insert into loan_info (prop_name,prop_type,loan_time,loan_num)+values(+()+,+()+,+()+,+()+); (sql); DefaultTableModel mod= new DefaultTableModel(getDate(),columnName); (mod); (); (); catch(Exception e) try if(rs1!=null) (); if(stat!=null) (); if(conn!=null) (); catch(Exception e2)
16、关闭失败); (); ); ( new ActionListener() public void actionPerformed(ActionEvent e) DefaultTableModel dtb=new DefaultTableModel(selectDate(),columnName); (dtb); (); (); ); /*(new ActionListener() public void actionPerformed(ActionEvent arg0) );*/ (this); (new ActionListener() public void actionPerformed
17、(ActionEvent arg0) DefaultTableModel mod = new DefaultTableModel(getDate(),columnName); (mod); (); (); ); ().addListSelectionListener( new ListSelectionListener() public void valueChanged(ListSelectionEvent e) (new ActionListener() public void actionPerformed(ActionEvent arg0) try int j= (); (); con
18、n=(jdbc:,sa,); stat=(); String sql1=delete from loan_info where prop_id=+(j).get(0)+; (sql1); catch(Exception ee) finally try if(rs1!=null) (); if(stat!=null) (); if(conn!=null) (); catch(Exception e2) 关闭失败); (); DefaultTableModel mod = new DefaultTableModel(getDate(),columnName); (mod); (); (); );
19、); ().addListSelectionListener( new ListSelectionListener() public void valueChanged(ListSelectionEvent e) int i= (); (i).get(0).toString(); (String)(i).get(1); (String)(i).get(2); (i).get(3).toString(); (i).get(4).toString(); (i).get(5).toString(); ); public Vector selectDate() data=new Vector(); t
20、ry (); conn=(jdbc:,sa,); stat=(); int x=().trim(); how(); public void actionPerformed(ActionEvent e) ;import class Loan_prop_select extends JFrame implements ActionListener Connection conn=null; Statement stat=null; ResultSet rs=null; JTable table=null; JLabel label; JTextField text; JButton btn_ok=
21、null,btn_exit=null; JPanel p1=null,p2=null; Vector columnName=new Vector(); public Loan_prop_select() (资产借出查询); (流水号); (资产编号); (借用人); (借出数量); (借出时间); p1=new JPanel(); p2=new JPanel(); text=new JTextField(); text=new JTextField(5); btn_ok=new JButton(查询); btn_exit=new JButton(退出); (new JLabel(资产编号);
22、(text); (btn_ok); (btn_exit); (数据查询); (this); table=new JTable(),columnName); (new BorderLayout(); (p1,; (new JScrollPane(table),; (400,300,500,400); (EXIT_ON_CLOSE); (new ActionListener() Override public void actionPerformed(ActionEvent arg0) DefaultTableModel dtm=new DefaultTableModel(selectDate()
23、,columnName); (dtm); (); (); ); public Vector selectDate() Vector data=new Vector(); try (); conn=(jdbc:,sa,); stat=(); int x=().trim(); how(); public void actionPerformed(ActionEvent e) ;import class back_prop_select extends JFrame implements ActionListener Vector data=null; DefaultTableModel model=null; Connection conn=null; Statement stat=null; ResultSet rs=null; JPanel pa1,pa2; JButton btn1,btn2; JTable tab=null; JTextField tex=null; JTextField txt1,txt2,txt3,txt4,txt5; JLabel lab1,lab2,lab3; Vector columnName=new Vector(); public back_p
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1