byd是什么意思
4.2设计代码
Java源程序:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import java.sql.*;
import java.lang.*;
import java.util.*;
import javax.swing.table.*;取决
import java.math.*;
class DB_LS implements ActionListener{
JFrame frame=new JFrame("欢迎进入LS工资管理系统");
JLabel label=new JLabel("09网络2_54_李胜",JLabel.CENTER);
JButton button1=new JButton("进入系统");
JButton button2=new JButton("5233退出系统");
ImageIcon im=new ImageIcon("1.jpg");
北大青鸟计算机培训学校怎样 JLabel a1=new JLabel(im);
void Create(){
JPanel pcontentPane=(ContentPane();
JPanel pcontentPane1=new JPanel();
pcontentPane.add(label);
pcontentPane.tLayout(new FlowLayout());
pcontentPane.add(button1);
pcontentPane.add(button2);
pcontentPane.add(new Label(" "));
pcontentPane.add(a1);
pcontentPane.);
pcontentPane.tVisible(true);
button1.addActionListener(this);
button2.addActionListener(this);
frame.tDefaultCloOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.tBounds(200,100,550,600);
frame.tVisible(true);
}
public static void main(String[] args){
DB_LS dome=new DB_LS();
dome.Create();
}
public void actionPerformed(ActionEvent e){
if(button1.Source())){
DL dl=new DL();
dl.create();
}
if(button2.Source())){//退出
it(0);
}
}
faceless}
class DL implements ActionListener{
picture的近义词
JFrame frame=new JFrame("职工/管理员登陆");
JLabel label1=new JLabel("用户名");
JLabel label2=new JLabel("密码");
JButton logonButton1=new JButton("管理员登录");
JButton logonButton2=new JButton("职工登录");
JButton cancelButton=new JButton("退出");
JTextField t1=new JTextField(0);
JTextField t2=new JTextField(0);
ImageIcon im=new ImageIcon("2.jpg");
JLabel a2=new JLabel(im);
JTextField urname=new JTextField(9);
JPasswordField password=new JPasswordField(9);
void create(){
JPanel p=(ContentPane();
JPanel p1=new JPanel();
p.tLayout(new FlowLayout());
p.add(label1);
p.tSize(5,5);
p.tLocation(4,8);
p.add(urname);
p.tSize(100,200);
p.tLocation(800,800);
p.add(label2);
p.tSize(50,20);
p.tLocation(40,80);
p.add(password);
p.tSize(100,20);
p.tLocation(80,120);
p.add(logonButton1);
p.add(new JLabel(" "));
decorate p.add(logonButton2);
p.add(new JLabel(" "));
p.add(cancelButton);
p.add(new JLabel(" "));
p.add(a2);
p.add(t1);
p.add(t2);
p.tBackground(Color.blue);
p.tVisible(true);
logonButton1.addActionListener(this);
logonButton2.addActionListener(this);
cancelButton.addActionListener(this);
frame.tDefaultCloOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.tBounds(200,100,750,550);
frame.tVisible(true);
}
public void actionPerformed(ActionEvent e){
if(logonButton1.Source())&&(Text().equals("123")==true)&&(Text().equals("123")==true)){
GZGLZJM gz=new GZGLZJM();hotsauce
gz.create();
}
el{JOptionPane.showMessageDialog(null,"对不起,你输入的密码错误!");
};
if(logonButton2.Source())&&(Text().Text())==true)&&(Text().Text())==true)){
XK xk=new XK();
xk.create();
Connection con;
Statement sql;
ResultSet rs;
Vector vector=new Vector();
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (ClassNotFoundException e1) {
System.out.println("" + e1);
好看英文名
}
try {
con = Connection("jdbc:odbc:123", "", "");
sql = ateStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);
uteQuery("SELECT Gno,mm FROM Y WHERE Gno="+t1.getText() +"AND mm="+t2.getText());
}catch (SQLException e1) {
System.out.println(e1);
}
}
if(cancelButton.Source())){
it(0);
}
}
}
class GZGLZJM extends JFrame implements ActionListener{
JFrame f=new JFrame("工资管理系统");
JButton b1=new JButton("津贴管理");
JButton b2=new JButton("总查询");
JButton b3=new JButton("工资管理");
JButton b4=new JButton("后勤管理");
JButton b6=new JButton("员工个人信息管理");
JButton b5=new JButton("返回");
ImageIcon im=new ImageIcon("3.jpg");
JLabel a3=new JLabel(im);
void create(){
JPanel p=(ContentPane();
长沙会计培训 JPanel p1=new JPanel();
p.tLayout(new FlowLayout());
p.add(b1);
p.add(new JLabel(" "));