62,614
社区成员
发帖
与我相关
我的任务
分享
package com.pllpwy.Login;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.Icon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
public class LoginUI implements ActionListener {
JFrame j;
JLabel jLabel1;
JLabel jLabel2;
JLabel jLabel3;
JLabel jLabel4;
JButton jButton3;
JButton jButton2;
JButton jButton1;
JPasswordField jPasswordField1;
JTextField jTextField1;
Icon i;
public LoginUI() {
j = new JFrame();
//节省空间。代码略。。。
j.setResizable(false);
j.setLocation(300, 200);
j.setVisible(true);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void actionPerformed(ActionEvent e) {
char[] pwd = jPasswordField1.getPassword();
String userpwd = new String(pwd);
String username = jTextField1.getText();
//JOptionPane.showMessageDialog(null, e.getActionCommand());
}
public static void main(String[] args) {
new LoginUI();
}
}