package system;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import java.awt.Font;
import javax.swing.JTextField;
import systemfour.Changepsd;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Label;
import java.awt.Button;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.Color;
import java.awt.SystemColor;
public class Adm {
private JFrame frame;
private JTextField userPassText;
private JTextField textField_2;
private JTextField textField_3;
private JTextField userNameText;
public static String nr = null;
Manage m1 = new Manage();
Changepsd cc1 = new Changepsd();
VerifyCodeUtils V1=new VerifyCodeUtils();
public static String aa;
public static String c2;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Adm window = new Adm();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
public Adm() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.getContentPane().setBackground(new Color(135, 206, 250));
frame.setBounds(100, 100, 631, 525);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.getContentPane().setLayout(null);
frame .setLocationRelativeTo( null );
JLabel lblNewLabel = new JLabel("\u6B22\u8FCE\u6765\u5230\u767B\u5F55\u754C\u9762");
lblNewLabel.setFont(new Font("幼圆", Font.BOLD, 24));
lblNewLabel.setBounds(150, 33, 284, 37);
frame.getContentPane().add(lblNewLabel);
JLabel label = new JLabel("\u7528\u6237\u540D\uFF1A");
label.setFont(new Font("幼圆", Font.BOLD, 22));
label.setBounds(15, 119, 97, 21);
frame.getContentPane().add(label);
JLabel label_1 = new JLabel("\u5BC6\u7801\uFF1A");
label_1.setFont(new Font("幼圆", Font.BOLD, 22));
label_1.setBounds(15, 203, 81, 21);
frame.getContentPane().add(label_1);
aa=V1.createOneCodeImage();
userNameText = new JTextField();
userNameText.setBounds(168, 116, 208, 37);
frame.getContentPane().add(userNameText);
userNameText.setColumns(10);
userPassText = new JTextField();
userPassText.setBounds(168, 195, 208, 37);
frame.getContentPane().add(userPassText);
userPassText.setColumns(10);
JLabel label_2 = new JLabel("\u786E\u8BA4\u5BC6\u7801\uFF1A");
label_2.setFont(new Font("幼圆", Font.BOLD, 22));
label_2.setBounds(15, 271, 125, 21);
frame.getContentPane().add(label_2);
JLabel label_5 = new JLabel("");
label_5.setIcon(new ImageIcon("./verifyCodeImg/\\"+aa+".jpg"));
label_5.setBounds(190, 395, 158, 55);
frame.getContentPane().add(label_5);
textField_2 = new JTextField();
textField_2.setBounds(168, 268, 208, 37);
frame.getContentPane().add(textField_2);
textField_2.setColumns(10);
JLabel label_3 = new JLabel("\u9A8C\u8BC1\u7801\uFF1A");
label_3.setFont(new Font("幼圆", Font.BOLD, 22));
label_3.setBounds(15, 351, 97, 21);
frame.getContentPane().add(label_3);
JButton button_2 = new JButton("\u91CD\u65B0\u83B7\u53D6");
button_2.setBackground(SystemColor.control);
button_2.setForeground(Color.RED);
button_2.setFont(new Font("微软雅黑", Font.PLAIN, 12));
button_2.addMouseListener(new MouseAdapter() {
@Override
public void mouseReleased(MouseEvent arg0) {
String p1=V1.createOneCodeImage();
aa=p1;
String c2="./verifyCodeImg/\\"+aa+".jpg";
label_5.setIcon(new ImageIcon(c2));
frame.getContentPane().add(label_5);
}
});
button_2.setBounds(403, 351, 89, 25);
frame.getContentPane().add(button_2);
textField_3 = new JTextField();
textField_3.setBounds(168, 343, 208, 37);
frame.getContentPane().add(textField_3);
textField_3.setColumns(10);
JButton button = new JButton("\u786E\u8BA4");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String usrName = userNameText.getText();
String usrPass = userPassText.getText();
String rePass = textField_2.getText();
String userYZM=textField_3.getText();
if (m1.CheckXMMima(usrName, usrPass) && usrPass.equals(rePass)&&m1.CheckYZM(userYZM, aa)) {
JOptionPane.showMessageDialog(null, "登录成功");
nr = usrName;
frame.dispose();
new Tools(nr);
Tools.main(null);
} else {
JOptionPane.showMessageDialog(null, "登录错误");
String p1=V1.createOneCodeImage();
aa=p1;
String p2="./verifyCodeImg/\\"+aa+".jpg";
label_5.setIcon(new ImageIcon(p2));
}
}
});
button.setFont(new Font("幼圆", Font.BOLD, 22));
button.setBounds(438, 145, 123, 46);
frame.getContentPane().add(button);
JButton button_1 = new JButton("\u8FD4\u56DE");
button_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
frame.dispose();
new Begin().main(null);
}
});
button_1.setFont(new Font("幼圆", Font.BOLD, 22));
button_1.setBounds(438, 243, 123, 46);
frame.getContentPane().add(button_1);
JLabel label_4 = new JLabel("");
label_4.setIcon(new ImageIcon("./pictures/123.jpg"));
label_4.setBounds(0, 0, 609, 393);
frame.getContentPane().add(label_4);
}
}
最近下载更多
泰州市斑驳时光 LV4
2023年9月15日
queueandstack LV3
2022年12月2日
计算机暴龙战士 LV19
2022年11月19日
testuser1234567 LV24
2022年5月31日
微信网友_5872158626074624 LV3
2022年3月17日
lmj0911 LV3
2021年9月6日
ericxu1116 LV24
2021年6月23日
zktotti
2021年6月23日
暂无贡献等级
wanglinddad LV55
2021年6月11日
纯纯粹粹112332 LV6
2021年6月8日

最近浏览