package WageManage;import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.TextField;
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.JOptionPane;class Worker_01 extends JFrame { public JFrame frame; public Container c; public Worker_01() {
frame = new JFrame("职工工资管理系统");
c = frame.getContentPane();
c.setLayout(null);
frame.setResizable(false); JLabel information0 = new JLabel("欢迎进入职工工资管理系统", JLabel.CENTER);
information0.setFont(new Font("宋体", Font.BOLD, 25));
information0.setSize(350, 50);
information0.setLocation(0, 0);
information0.setForeground(Color.red);
c.add(information0); JLabel yonghuL = new JLabel("用户名:", JLabel.CENTER);
yonghuL.setFont(new Font("宋体", Font.BOLD, 18));
yonghuL.setForeground(Color.red);
yonghuL.setSize(80, 30);
yonghuL.setLocation(60, 70);
c.add(yonghuL);
final TextField yonghuT = new TextField();
yonghuT.setSize(90, 25);
yonghuT.setLocation(170, 70);
c.add(yonghuT); JLabel koulingL = new JLabel("口  令:", JLabel.CENTER);
koulingL.setFont(new Font("宋体", Font.BOLD, 18));
koulingL.setForeground(Color.red);
koulingL.setSize(80, 30);
koulingL.setLocation(60, 110);
c.add(koulingL);
final TextField koulingT = new TextField();
koulingT.setEchoChar('*');
koulingT.setSize(90, 25);
koulingT.setLocation(170, 110);
c.add(koulingT); JLabel information1 = new JLabel("指导教师:李四");
information1.setFont(new Font("宋体", Font.BOLD, 17));
information1.setForeground(Color.red);
information1.setSize(350, 110);
information1.setLocation(100, 140);
c.add(information1); JLabel information2 = new JLabel("制作人:张三");
information2.setFont(new Font("宋体", Font.BOLD, 14));
information2.setForeground(Color.red);
information2.setSize(350, 110);
information2.setLocation(130, 160);
c.add(information2); JLabel information3 = new JLabel("张三");
information3.setFont(new Font("宋体", Font.BOLD, 14));
information3.setForeground(Color.red);
information3.setSize(350, 110);
information3.setLocation(190, 180);
c.add(information3);
JLabel information4 = new JLabel("制作时间:2008-4");
information4.setFont(new Font("宋体", Font.BOLD, 14));
information4.setForeground(Color.red);
information4.setSize(350, 110);
information4.setLocation(115, 200);
c.add(information4); JButton registerButton = new JButton("登录");
registerButton.addActionListener(new ActionListener() {
public void ActionPerformed(ActionEvent event) {
String a, b;
a = yonghuT.getText();
b = koulingT.getText();
if ((a.equals("123") == true) && (b.equals("123") == true)) {// 创建z2的对象,显示管理窗口
z2 win = new z2();
win.setSize(500, 400);
win.setVisible(true);
win.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
win.setResizable(false);
win.setLocation(100, 100);
} else
JOptionPane.showMessageDialog(null, "对不起,你输入的信息错误!");
} public void ActionPerformed(ActionEvent e) {
// TODO Auto-generated method stub } public void ActionPerformed(ActionEvent e) {
// TODO Auto-generated method stub } public void ActionPerformed(ActionEvent e) {
// TODO Auto-generated method stub

}
});
registerButton.setLocation(40, 150);
registerButton.setSize(80, 30);
registerButton.setFont(new Font("宋体", Font.BOLD, 18));
registerButton.setForeground(Color.red);
c.add(registerButton, BorderLayout.CENTER); JButton backButton = new JButton("退出");
backButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
System.exit(0);
}
});
backButton.setLocation(190, 150);
backButton.setSize(80, 30);
backButton.setFont(new Font("宋体", Font.BOLD, 18));
backButton.setForeground(Color.red);
c.add(backButton, BorderLayout.CENTER); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(350, 300);
frame.setLocation(100, 100);
frame.setVisible(true); }
}