欢迎来到天天文库
浏览记录
ID:39696973
大小:33.99 KB
页数:50页
时间:2019-07-09
《工资系统代码JAVA版》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、标准文档工资系统代码/*系统欢迎界面*/importjava.awt.FlowLayout;importjava.awt.event.*;importjavax.swing.*;@SuppressWarnings("serial")classWagesSystemextendsJFrameimplementsActionListener{JFrameframe=newJFrame("欢迎进入工资管理系统");JButtonbutton1=newJButton("进入系统");JButtonbutton2=newJButton("退出系统");Imag
2、eIconim=newImageIcon("1.jpg");JLabela1=newJLabel(im);voidCreate(){JPanelpcontentPane=(JPanel)frame.getContentPane();pcontentPane.add(a1);pcontentPane.setLayout(newFlowLayout());pcontentPane.add(button1);pcontentPane.add(button2);pcontentPane.setVisible(true);button1.addActionLi
3、stener(this);button2.addActionListener(this);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);frame.pack();frame.setLocationRelativeTo(null);实用文案标准文档frame.setVisible(true);}publicstaticvoidmain(String[]args){WagesSystemdome=newWagesSystem();dome.Create();}publicvoidactionPe
4、rformed(ActionEvente){if(button1.equals(e.getSource())){DLdl=newDL();dl.create();frame.dispose();}if(button2.equals(e.getSource())){System.exit(0);}}}/*登录界面*/importjava.awt.HeadlessException;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.Con
5、nection;实用文案标准文档importjava.sql.DriverManager;importjava.sql.ResultSet;importjava.sql.SQLException;importjava.sql.Statement;importjavax.swing.JButton;importjavax.swing.JFrame;importjavax.swing.JLabel;importjavax.swing.JOptionPane;importjavax.swing.JPasswordField;importjavax.swin
6、g.JTextField;importjava.net.*;importjava.sql.*;@SuppressWarnings("serial")classDLextendsJFrameimplementsActionListener{NetConnsql;Statementsqll;ResultSetrs;JFrameframe=newJFrame("职工/管理员登陆");JLabellabel1=newJLabel("用户名");JLabellabel2=newJLabel("密码");JButtonlogonButton1=newJButto
7、n("系统管理员登录");JButtonlogonButton2=newJButton("教职工登录");JButtonlogonButton3=newJButton("财务管理员登录");JButtoncancelButton=newJButton("退出");JTextFieldusername=newJTextField(9);JPasswordFieldpassword=newJPasswordField(9);staticStringt1;实用文案标准文档staticStringt2;voidcreate(){frame.setLayout
8、(null);label1.setBounds(60,20,50,20);frame.add(label1)
此文档下载收益归作者所有