opupdate.java

来自「老师要求我们用java 做的学生信息管理系统」· Java 代码 · 共 74 行

JAVA
74
字号
package collegems;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;

public class OpUpdate extends JDialog {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自动生成方法存根
	final OpUpdate updatedialog=new OpUpdate();
	updatedialog.setVisible(true);
	updatedialog.setSize(342,320);

	}
	public OpUpdate() {
		super();
		getContentPane().setLayout(null);
		setTitle("修改操作员密码");

		final JLabel label = new JLabel();
		label.setText("操作员名:");
		label.setBounds(75, 64, 68, 15);
		getContentPane().add(label);

		final JLabel label_1 = new JLabel();
		label_1.setText("  源密码:");
		label_1.setBounds(75, 98, 60, 15);
		getContentPane().add(label_1);

		final JLabel label_2 = new JLabel();
		label_2.setText("  新密码:");
		label_2.setBounds(75, 130, 60, 15);
		getContentPane().add(label_2);

		final JLabel label_3 = new JLabel();
		label_3.setText("确认密码:");
		label_3.setBounds(75, 166, 68, 15);
		getContentPane().add(label_3);

		final JTextField Name = new JTextField();
		Name.setBounds(149, 62, 95, 20);
		getContentPane().add(Name);

		final JPasswordField Password = new JPasswordField();
		Password.setBounds(149, 94, 95, 24);
		getContentPane().add(Password);

		final JPasswordField Newpassword = new JPasswordField();
		Newpassword.setBounds(149, 126, 95, 24);
		getContentPane().add(Newpassword);

		final JPasswordField Repassword = new JPasswordField();
		Repassword.setBounds(149, 162, 95, 24);
		getContentPane().add(Repassword);

		final JButton button = new JButton();
		button.setText("修改");
		button.setBounds(120, 217, 72, 31);
		getContentPane().add(button);

		final JButton button_1 = new JButton();
		button_1.setText("取消");
		button_1.setBounds(198, 217, 68, 31);
		getContentPane().add(button_1);
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?