




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
千里之行,始于足下讓知識(shí)帶有溫度。第第2頁/共2頁精品文檔推薦企業(yè)工資管理系統(tǒng)(Java+MySQL)企業(yè)工資管理系統(tǒng)(MySQL+Java)
本代碼僅供初學(xué)者參考使用,互相學(xué)習(xí),共同長(zhǎng)進(jìn),讓優(yōu)秀成為一種習(xí)慣。軟件下載:http://51/
開發(fā)語言:Java
開發(fā)工具:eclipse
數(shù)據(jù)庫軟件:MySQL
數(shù)據(jù)庫驅(qū)動(dòng):mysql-connector-java-5.1.6-bin
驅(qū)動(dòng)下載地址:/s/1sjx0LWT
以下是代碼和界面截圖,共7個(gè)類。
1.DB1歡迎界面
importjava.awt.*;
importjava.awt.event.*;
importjavax.swing.*;
classDB1extendsJFrameimplementsActionListener{
privatestaticfinallongserialVersionUID=1L;
JFrameframe=newJFrame("歡迎進(jìn)入工資管理系統(tǒng)");
JLabellabel=newJLabel("",JLabel.CENTER);
JButtonbutton1=newJButton("進(jìn)入系統(tǒng)");
JButtonbutton2=newJButton("退出系統(tǒng)");
voidCreate(){
JPanelpcontentPane=(JPanel)frame.getContentPane();
pcontentPane.add(label);
pcontentPane.setLayout(newFlowLayout());
pcontentPane.add(button1);
pcontentPane.add(button2);
pcontentPane.setBackground(Color.gray);
pcontentPane.setVisible(true);
button1.addActionListener(this);
button2.addActionListener(this);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setBounds(500,300,300,150);
frame.setResizable(false);
frame.setVisible(true);
}
publicstaticvoidmain(String[]args){
DB1dome=newDB1();
dome.Create();
}
publicvoidactionPerformed(ActionEvente){
if(button1.equals(e.getSource())){
DLdl=newDL();
dl.create();
frame.dispose();
}
if(button2.equals(e.getSource())){//退出
System.exit(0);
}
}
}
1.DL登陸界面
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjava.sql.Connection;
importjava.sql.DriverManager;
importjava.sql.ResultSet;
importjava.sql.Statement;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
importjavax.swing.JOptionPane;
importjavax.swing.JPanel;
importjavax.swing.JPasswordField;
importjavax.swing.JTextField;
importcom.mysql.jdbc.PreparedStatement;
@SuppressWarnings("serial")
classDLextendsJFrameimplementsActionListener
{
JFrameframe=newJFrame("職工/管理員登陸");
JLabellabel1=newJLabel("用戶名");
JLabellabel2=newJLabel("密碼");
JButtonlogonButton1=newJButton("管理員登錄");
JButtonlogonButton2=newJButton("職工登錄");
JButtoncancelButton=newJButton("退出");
JTextFieldusername=newJTextField(9);
JPasswordFieldpassword=newJPasswordField(9);
staticStringt1;
staticStringt2;
voidcreate()
{
JPanelp=(JPanel)frame.getContentPane();
@SuppressWarnings("unused")
JPanelp1=newJPanel();
p.setLayout(newFlowLayout());
p.add(label1);
p.setSize(5,5);
p.setLocation(4,8);
p.add(username);
p.setSize(100,200);
p.setLocation(800,800);
p.add(label2);
p.setSize(50,20);
p.setLocation(40,80);
p.add(password);
p.setSize(100,20);
p.setLocation(80,120);
p.add(logonButton1);
p.add(logonButton2);
p.add(cancelButton);
p.setBackground(Color.gray);
p.setVisible(true);
logonButton1.addActionListener(this);
logonButton2.addActionListener(this);
cancelButton.addActionListener(this);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setBounds(500,300,500,220);
frame.setVisible(true);
}
@SuppressWarnings("deprecation")
publicvoidactionPerformed(ActionEvente)
{
t1=username.getText();
t2=password.getText();
if(e.getSource()==logonButton1)
{
if(username.getText().equals("admin")==true
GZGLZJMgz=newGZGLZJM();
gz.create();
frame.dispose();
}
else{
JOptionPane.showMessageDialog(null,"輸入用戶名或密碼錯(cuò)誤!");
}
}
if(e.getSource()==logonButton2)
{
try{
Connectioncon;
Statementps;
ResultSetrs;
Stringsql=null;
Class.forName("org.gjt.mm.mysql.Driver");
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con=DriverManager.getConnection(
"jdbc:mysql://localhost:3306/management","root","hellomysql");
sql="select*fromworkerwherenum='"+t1+"'andpassword='"+t2+"'";
ps=(PreparedStatement)con.prepareStatement(sql);
rs=ps.executeQuery(sql);
if(rs.next())
{
if(rs.getString("num").equals(t1)
yg.create();
frame.dispose();
JOptionPane.showMessageDialog(this,"登錄勝利!");
this.dispose();
}
}
else{
JOptionPane.showMessageDialog(this,"輸入用戶名或密碼錯(cuò)誤!");
}
}catch(Exceptione1){
//TODOAuto-generatedcatchblock
e1.printStackTrace();
}
}
if(cancelButton.equals(e.getSource()))//退出
{
System.exit(0);
}
}
}
2.GZGL工資管理界面
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.Connection;
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.JPanel;
importjavax.swing.JScrollPane;
importjavax.swing.JSplitPane;
importjavax.swing.JTable;
importjavax.swing.JTextField;
@SuppressWarnings("serial")
publicclassGZGLextendsJFrameimplementsActionListener{
JFramef=newJFrame("員工工資管理");
JButtonb1=newJButton("錄入");
JButtonb2=newJButton("修改");
JButtonb3=newJButton("刪除");
JButtonb4=newJButton("查詢?nèi)?);
JButtonb5=newJButton("返回");
JTextFieldtf1=newJTextField(6);
JTextFieldtf2=newJTextField(4);
JTextFieldtf3=newJTextField(4);
JTextFieldtf4=newJTextField(4);
JTextFieldtf5=newJTextField(4);
JTextFieldtf6=newJTextField(4);
JTextFieldtf7=newJTextField(6);
JTextFieldtf8=newJTextField(6);
JTextFieldtf9=newJTextField(4);
JTextFieldtf10=newJTextField(4);
JTextFieldtf11=newJTextField(6);
JTextFieldtf12=newJTextField(6);
String[]cloum={"職工號(hào)","基本工資","津貼","獎(jiǎng)金","保險(xiǎn)","房貸","總工資"};
Object[][]row=newObject[50][7];
JTabletable=newJTable(row,cloum);
JScrollPanescrollpane=newJScrollPane(table);
JSplitPanesplitpane=newJSplitPane(JSplitPane.VERTICAL_SPLIT);
voidcreate(){
JPanelp=(JPanel)f.getContentPane();
p.setLayout(newFlowLayout());
p.add(scrollpane);
p.add(splitpane);
JPanelp1=newJPanel();
p1.add(b1);
p1.add(b2);
p1.add(b3);
p1.add(b4);
p1.add(b5);
JPanelp2=newJPanel();
p2.setBackground(Color.gray);
p2.add(scrollpane);
@SuppressWarnings("unused")
JPanelp3=newJPanel();
p.setLayout(newFlowLayout());
p.add(newJLabel(""));
p.add(newJLabel("職工號(hào)"));
p.add(tf1);
p.add(newJLabel("基本工資"));
p.add(tf2);
p.add(newJLabel("津貼"));
p.add(tf3);
p.add(newJLabel("獎(jiǎng)金"));
p.add(tf4);
p.add(newJLabel("保險(xiǎn)"));
p.add(tf5);
p.add(newJLabel("房貸"));
p.add(tf6);
p.add(newJLabel("總工資"));
p.add(tf7);
p.add(newJLabel("姓名"));
p.add(tf8);
p.add(newJLabel("性別"));
p.add(tf9);
p.add(newJLabel("年齡"));
p.add(tf10);
p.add(newJLabel("部門"));
p.add(tf11);
p.add(newJLabel("職業(yè)"));
p.add(tf12);
splitpane.add(p1,JSplitPane.TOP);
splitpane.add(p2,JSplitPane.BOTTOM);
splitpane.setDividerLocation(50);
p.setBackground(Color.gray);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
f.setBounds(500,100,500,600);
f.setResizable(false);//可以調(diào)節(jié)界面大小
f.setVisible(true);
}
publicvoidactionPerformed(ActionEvente){
if(b1.equals(e.getSource())){//錄入
Connectioncon;
Statementsql;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
System.out.println(""+e1);
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement();
StringinsertStr="INSERTINTOsalary(worker_num,basic_pay,welfare,bonus,insurance,housing_fund,payment)VALUES('"+tf1.getText()+"','"+tf2.getText()+"','"+tf3.getText()+"','"+tf4.getText()+"','"+tf5.getText()+"','"+tf6.getText()+"','"+tf7.getText()+"');";
sql.executeUpdate(insertStr);
StringinsertStr1="INSERTINTOworker(num,name,sex,age,dep,occup,password)VALUES('"+tf1.getText()+"','"+tf8.getText()+"','"+tf9.getText()+"','"+tf10.getText()+"','"+tf11.getText()+"','"+tf12.getText()+"','"+tf1.getText()+"');";
sql.executeUpdate(insertStr1);
con.close();
JOptionPane.showMessageDialog(this,"入錄勝利!");
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"入錄失?。?);
}
}
if(b2.equals(e.getSource())){//修改
Connectioncon;
Statementsql;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
System.out.println(""+e1);
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement();
StringupdateStr="UPDATEsalarySETbasic_pay='"+tf2.getText()+"',welfare='"+tf3.getText()+"',bonus='"+tf4.getText()+"',insurance='"+tf5.getText()+"',housing_fund='"+tf6.getText()+"',payment='"+tf7.getText()+"'whereworker_num='"+tf1.getText()+"';";
sql.executeUpdate(updateStr);
StringupdateStr1="UPDATEworkerSETname='"+tf8.getText()+"',sex='"+tf9.getText()+"',age='"+tf10.getText()+"',dep='"+tf11.getText()+"',occup='"+tf12.getText()+"'wherenum='"+tf1.getText()+"';";
sql.executeUpdate(updateStr1);
JOptionPane.showMessageDialog(this,"修改勝利!");
con.close();
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"信息不存在!");
}
}
if(b3.equals(e.getSource())){//刪除
Connectioncon;
Statementsql;
@SuppressWarnings("unused")
ResultSetrs;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
System.out.println(""+e1);
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
sql.executeUpdate("DELETEFROMsalarywhereworker_num='"+tf1.getText()+"';");
sql.executeUpdate("DELETEFROMworkerwherenum='"+tf1.getText()+"';");
JOptionPane.showMessageDialog(this,"刪除勝利!");
con.close();
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"刪除失??!");
}
}
if(b4.equals(e.getSource())){//查詢所有
Connectioncon;
Statementsql;
ResultSetrs;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
JOptionPane.showMessageDialog(this,"銜接數(shù)據(jù)庫失??!");
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);
if(b4.equals(e.getSource())){
for(inti=0;i<50;i++)
for(intj=0;j<4;j++)
table.setValueAt("",i,j);
rs=sql.executeQuery("select*fromsalary");
intk=-1;
while(rs.next()){
++k;
Stringno=rs.getString(1);
Stringjb=rs.getString(2);
Stringjt=rs.getString(3);
Stringjj=rs.getString(4);
Stringbx=rs.getString(5);
Stringzf=rs.getString(6);
Stringsum=rs.getString(7);
table.setValueAt(no,k,0);
table.setValueAt(jb,k,1);
table.setValueAt(jt,k,2);
table.setValueAt(jj,k,3);
table.setValueAt(bx,k,4);
table.setValueAt(zf,k,5);
table.setValueAt(sum,k,6);
}
}
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"查詢失??!");
}
}
if(b5.equals(e.getSource())){//返回
GZGLZJMgl=newGZGLZJM();
gl.create();
f.dispose();
}
}
}
3.GZGLZJM工資管理主界面
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JPanel;
classGZGLZJMextendsJFrameimplementsActionListener{
privatestaticfinallongserialVersionUID=1L;
JFramef=newJFrame("工資管理系統(tǒng)");
JButtonb1=newJButton("工資管理");
JButtonb2=newJButton("員工信息管理");
JButtonb3=newJButton("返回");
voidcreate(){
JPanelp=(JPanel)f.getContentPane();
p.setLayout(newFlowLayout());
p.add(b1);
p.add(b2);
p.add(b3);
p.setBackground(Color.gray);
p.setVisible(true);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
f.setBounds(500,300,500,200);
f.setResizable(false);
f.setVisible(true);
}
publicvoidactionPerformed(ActionEvente){
if(b3.equals(e.getSource())){//返回
DLd=newDL();
d.create();
f.dispose();
}
if(b2.equals(e.getSource())){//員工信息管理
YGGLyg=newYGGL();
yg.create();
f.dispose();
}
if(b1.equals(e.getSource())){//員工工資管理
GZGLgz=newGZGL();
gz.create();
f.dispose();
}
}
}
4.XGMM修改密碼
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjava.sql.Connection;
importjava.sql.DriverManager;
importjava.sql.SQLException;
importjava.sql.Statement;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
importjavax.swing.JOptionPane;
importjavax.swing.JPanel;
importjavax.swing.JPasswordField;
@SuppressWarnings("serial")
classXGMMextendsDLimplementsActionListener{
JFrameframe=newJFrame("密碼修改");
JLabellabel1=newJLabel("原密碼");
JLabellabel2=newJLabel("新密碼");
JButtonButton1=newJButton("確定");
JButtoncancelButton=newJButton("返回");
JPasswordFieldpassword=newJPasswordField(9);
JPasswordFieldnewpassword=newJPasswordField(9);
voidcreate()
{
JPanelp=(JPanel)frame.getContentPane();
p.setLayout(newFlowLayout());
p.add(label1);
p.setSize(5,5);
p.setLocation(4,8);
p.add(password);
p.setSize(100,200);
p.setLocation(600,600);
p.add(label2);
p.setSize(50,20);
p.setLocation(40,80);
p.add(newpassword);
p.setSize(100,20);
p.setLocation(80,120);
p.add(Button1);
p.add(cancelButton);
p.setBackground(Color.cyan);
p.setVisible(true);
Button1.addActionListener(this);
cancelButton.addActionListener(this);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setBounds(200,100,500,220);
frame.setVisible(true);
}
publicvoidactionPerformed(ActionEvente)
{
if(e.getSource()==Button1)
{
Connectioncon;
Statementsql;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
JOptionPane.showMessageDialog(this,"銜接數(shù)據(jù)庫失?。?);
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement();
@SuppressWarnings("deprecation")
StringupdateStr="UPDATEworkerSETpassword='"+newpassword.getText()+"'wherenum='"+t1+"';";
sql.executeUpdate(updateStr);
JOptionPane.showMessageDialog(this,"修改勝利!");
con.close();
frame.dispose();
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"請(qǐng)輸入原密碼和新密碼!");
}
}
if(e.getSource()==cancelButton)//返回
{
YGGLZJMdl=newYGGLZJM();
dl.create();
frame.dispose();
}
}
}
5.YGGL員工信息管理界面
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.Connection;
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.JPanel;
importjavax.swing.JScrollPane;
importjavax.swing.JSplitPane;
importjavax.swing.JTable;
importjavax.swing.JTextField;
@SuppressWarnings("serial")
publicclassYGGLextendsJFrameimplementsActionListener{
JFramef=newJFrame("員工信息管理");
JButtonb2=newJButton("修改員工信息");
JButtonb3=newJButton("刪除員工信息");
JButtonb4=newJButton("查詢?nèi)繂T工信息");
JButtonb5=newJButton("返回");
JTextFieldtf1=newJTextField(8);
JTextFieldtf2=newJTextField(8);
JTextFieldtf3=newJTextField(6);
JTextFieldtf4=newJTextField(6);
JTextFieldtf5=newJTextField(6);
JTextFieldtf6=newJTextField(6);
String[]cloum={"職工號(hào)","姓名","性別","年齡","部門","職業(yè)"};
Object[][]row=newObject[50][6];
JTabletable=newJTable(row,cloum);
JScrollPanescrollpane=newJScrollPane(table);
JSplitPanesplitpane=newJSplitPane(JSplitPane.VERTICAL_SPLIT);
voidcreate(){
JPanelp=(JPanel)f.getContentPane();
p.setLayout(newFlowLayout());
p.add(scrollpane);
p.add(splitpane);
JPanelp1=newJPanel();
p1.add(b2);
p1.add(b3);
p1.add(b4);
p1.add(b5);
JPanelp2=newJPanel();
p2.setBackground(Color.gray);
p2.add(scrollpane);
p.setLayout(newFlowLayout());
p.add(newJLabel(""));
p.add(newJLabel("職工號(hào)"));
p.add(tf1);
p.add(newJLabel("姓名"));
p.add(tf2);
p.add(newJLabel("性別"));
p.add(tf3);
p.add(newJLabel("年齡"));
p.add(tf4);
p.add(newJLabel("部門"));
p.add(tf5);
p.add(newJLabel("職業(yè)"));
p.add(tf6);
splitpane.add(p1,JSplitPane.TOP);
splitpane.add(p2,JSplitPane.BOTTOM);
splitpane.setDividerLocation(50);
p.setBackground(Color.gray);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
f.setBounds(500,100,500,600);
f.setResizable(false);//可以調(diào)節(jié)界面大小
f.setVisible(true);
}
publicvoidactionPerformed(ActionEvente){
if(b2.equals(e.getSource())){//修改員工信息
Connectioncon;
Statementsql;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
JOptionPane.showMessageDialog(this,"銜接數(shù)據(jù)庫失??!");
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement();
StringupdateStr="UPDATEworkerSETname='"+tf2.getText()+"',sex='"+tf3.getText()+"',age='"+tf4.getText()+"',dep='"+tf5.getText()+"',occup='"+tf6.getText()+"'wherenum='"+tf1.getText()+"';";
sql.executeUpdate(updateStr);
JOptionPane.showMessageDialog(this,"修改勝利!");
con.close();
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"修改失??!");
}
}
if(b3.equals(e.getSource())){//刪除員工信息
Connectioncon;
Statementsql;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
JOptionPane.showMessageDialog(this,"銜接數(shù)據(jù)庫失??!");
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
sql.executeUpdate("DELETEFROMworkerwherenum='"+tf1.getText()+"';");
sql.executeUpdate("DELETEFROMsalarywhereworker_num='"+tf1.getText()+"';");
JOptionPane.showMessageDialog(this,"刪除勝利!");
con.close();
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"刪除失??!");
}
}
if(b4.equals(e.getSource())){//查詢所有員工信息
Connectioncon;
Statementsql;
ResultSetrs;
try{
Class.forName("org.gjt.mm.mysql.Driver");
}catch(ClassNotFoundExceptione1){
JOptionPane.showMessageDialog(this,"銜接數(shù)據(jù)庫失?。?);
}
try{
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/management","root","hellomysql");
sql=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
if(b4.equals(e.getSource())){
for(inti=0;i<50;i++)
for(intj=0;j<4;j++)
table.setValueAt("",i,j);
rs=sql.executeQuery("select*fromworker;");
intk=-1;
while(rs.next()){
++k;
Stringno=rs.getString(1);
Stringxm=rs.getString(2);
Stringxb=rs.getString(3);
Stringnl=rs.getString(4);
Stringbm=rs.getString(5);
Stringzy=rs.getString(6);
table.setValueAt(no,k,0);
table.setValueAt(xm,k,1);
table.setValueAt(xb,k,2);
table.setValueAt(nl,k,3);
table.setValueAt(bm,k,4);
table.setValueAt(zy,k,5);
}
}
}catch(SQLExceptione1){
JOptionPane.showMessageDialog(this,"查詢失??!");
}
}
if(b5.equals(e.getSource())){//返回
GZGLZJMgl=newGZGLZJM();
gl.create();
f.dispose();
}
}
}
6.YGGLZJM個(gè)人工資查詢界面
importjava.awt.Color;
importjava.awt.FlowLayout;
importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.sql.Connection;
importjava.sql.DriverManager;importjava.sql.ResultSet;
importjava.sql.SQLException;importjava.sql.Statement;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JOptionPane;importjavax.swing.JPanel;
importjavax.swing.JScrollPane;importjavax.swing.JSplitPane;importjavax.swing.JTable;
@SuppressWarnings("serial")
publicclassYGGLZJMextendsDLimplementsActionListener{
JFramef=newJFrame("工資管理");
JButtonb1=newJButton("查詢個(gè)人工資");
JButtonb2=newJButton("修改密碼");
JButtonb3=newJButton("返回");
String[]cloum={"職工號(hào)","基本工資","津貼","獎(jiǎng)金","保險(xiǎn)","房貸","總工資"};
Object[][]row=newObject[50][7];
JTabletable=newJTable(row,cloum);
JScrollP
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 寫字房租賃合同范例
- 產(chǎn)品返工合同范例
- 個(gè)人簡(jiǎn)易擔(dān)保合同范例
- 公司眾籌合同范例
- 體育機(jī)構(gòu)加盟合同范例
- 東莞房間空調(diào)采購合同范例
- 以工代賑勞務(wù)合同范例
- 全無機(jī)無鉛雙鈣鈦礦材料物性調(diào)控的理論研究
- 上海鋼琴租賃合同范例
- 靈活用工平臺(tái)稅收征管問題及對(duì)策研究
- 現(xiàn)代家政導(dǎo)論-課件 5.1.2認(rèn)識(shí)家政服務(wù)業(yè)分類
- 敬老院考勤管理制度范本
- 公司資產(chǎn)出租管理制度
- 概算審核服務(wù)投標(biāo)方案(技術(shù)方案)
- 離婚協(xié)議書常用范本2024年
- 《帝國(guó)的崩裂:細(xì)說五代十國(guó)史》隨筆
- 2025屆陜西省普通高中學(xué)業(yè)水平選擇性考試 政治試卷(含答案 )
- Unit+4+Sports+Getting+Started 高中英語上外版必修第二冊(cè)
- 綜合實(shí)踐活動(dòng)小學(xué)-玩紙課件
- 英語閱讀課教案5篇
- 1.1作品鑒賞一杯美酒教學(xué)設(shè)計(jì)高中音樂人音版必修音樂鑒賞
評(píng)論
0/150
提交評(píng)論