package com.view;
import java.awt.EventQueue;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.AbstractButton;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import java.awt.Button;
@SuppressWarnings("unused")
public class LogOn extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel contentPane;
private JTextField userNameTxt;
private JPasswordField passwordTxt;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
LogOn frame = new LogOn();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public LogOn() {
setTitle("\u7F51\u7EDC\u804A\u5929\u5BA4");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 789, 452);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JLabel lblNewLabel = new JLabel("\u7F51\u7EDC\u804A\u5929\u5BA4\u767B\u5F55\u7CFB\u7EDF");
lblNewLabel.setBounds(291, 15, 162, 21);
contentPane.add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("\u8D26\u53F7");
lblNewLabel_1.setBounds(88, 112, 81, 21);
contentPane.add(lblNewLabel_1);
JLabel lblNewLabel_2 = new JLabel("\u5BC6\u7801");
lblNewLabel_2.setBounds(88, 235, 81, 21);
contentPane.add(lblNewLabel_2);
userNameTxt = new JTextField();
userNameTxt.setBounds(346, 109, 262, 27);
contentPane.add(userNameTxt);
userNameTxt.setColumns(10);
passwordTxt = new JPasswordField();
passwordTxt.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
passwordTxt.setBounds(346, 232, 262, 27);
contentPane.add(passwordTxt);
JButton jb_logon = new JButton("\u767B\u5F55");
jb_logon.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
jb_logon.setBounds(88, 316, 123, 29);
contentPane.add(jb_logon);
JButton jb_reset = new JButton("\u53D6\u6D88");
jb_reset.addActionListener(new ActionListener() {
private Object userNameTxt;
private Object passwordTxt;
public void actionPerformed(ActionEvent e) {
((AbstractButton) this.userNameTxt).setText("");
((AbstractButton) this.passwordTxt).setText("");
}
});
jb_reset.setBounds(485, 316, 123, 29);
contentPane.add(jb_reset);
}
}