📄 deleteuser.java~5~
字号:
package carmanage;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.Rectangle;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
public class DeleteUser extends JFrame {
public DeleteUser() {
try {
jbInit();
} catch (Exception exception) {
exception.printStackTrace();
}
}
private void jbInit() throws Exception {
getContentPane().setLayout(null);
jLabel1.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel1.setText("姓名:");
jLabel1.setBounds(new Rectangle(32, 54, 63, 38));
jPasswordField1.addActionListener(new
DeleteUser_jPasswordField1_actionAdapter(this));
setTitle("删除用户");
jButton1.setBounds(new Rectangle(47, 222, 106, 43));
jButton1.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jButton1.setText("确定");
jButton2.setBounds(new Rectangle(242, 221, 92, 44));
jButton2.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jButton2.setText("返回");
jButton2.addActionListener(new DeleteUser_jButton2_actionAdapter(this));
this.getContentPane().add(jLabel1);
jPasswordField1.setBounds(new Rectangle(164, 130, 170, 36));
txtName.setBounds(new Rectangle(165, 60, 170, 34));
this.getContentPane().add(jLabel2);
this.getContentPane().add(txtName);
this.getContentPane().add(jPasswordField1);
this.getContentPane().add(jButton1);
this.getContentPane().add(jButton2);
jLabel2.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jLabel2.setText("密码:");
jLabel2.setBounds(new Rectangle(32, 125, 81, 34));
this.setSize(400,400);
this.setVisible(true);
}
JLabel jLabel1 = new JLabel();
JLabel jLabel2 = new JLabel();
JTextField txtName = new JTextField();
JPasswordField jPasswordField1 = new JPasswordField();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
public void jPasswordField1_actionPerformed(ActionEvent e) {
}
public void jButton2_actionPerformed(ActionEvent e) {
this.dispose();
}
}
class DeleteUser_jButton2_actionAdapter implements ActionListener {
private DeleteUser adaptee;
DeleteUser_jButton2_actionAdapter(DeleteUser adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
class DeleteUser_jPasswordField1_actionAdapter implements ActionListener {
private DeleteUser adaptee;
DeleteUser_jPasswordField1_actionAdapter(DeleteUser adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jPasswordField1_actionPerformed(e);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -