📄 changeframe.java
字号:
package com.cn.szhaccp.landing;
/*
* ChangeFrame.java
*
* Created on 2007年4月29日, 上午8:10
*/
/**
*
* @author Admin
*/
public class ChangeFrame extends javax.swing.JDialog {
/** Creates new form ChangeFrame */
public ChangeFrame(java.awt.Frame parent, boolean modal) {
super(parent, modal);
ToCenter tc = new ToCenter();
initComponents();
tc.SetDialogToCenter(this);
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" 生成的代码 ">//GEN-BEGIN:initComponents
private void initComponents() {
userID = new javax.swing.JLabel();
oldpassword = new javax.swing.JLabel();
newpassword = new javax.swing.JLabel();
newpassword1 = new javax.swing.JLabel();
userIDText = new javax.swing.JTextField();
oldpasswordText = new javax.swing.JPasswordField();
newpasswordText = new javax.swing.JPasswordField();
newpasswordText2 = new javax.swing.JPasswordField();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("\u4fee\u6539\u4fe1\u606f");
userID.setText("\u7528 \u6237 ID:");
oldpassword.setText("\u539f \u5bc6 \u7801:");
newpassword.setText("\u65b0 \u5bc6 \u7801:");
newpassword1.setText("\u786e\u8ba4\u65b0\u5bc6\u7801:");
jButton2.setText("\u786e \u8ba4");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setText("\u53d6 \u6d88");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(40, 40, 40)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(userID)
.add(oldpassword)
.add(newpassword)
.add(newpassword1)
.add(org.jdesktop.layout.GroupLayout.TRAILING, jButton2))
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(29, 29, 29)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(newpasswordText2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
.add(newpasswordText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
.add(oldpasswordText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
.add(userIDText, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE))
.add(52, 52, 52))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jButton1)
.add(60, 60, 60))))
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(29, 29, 29)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(userID)
.add(userIDText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(17, 17, 17)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(oldpassword)
.add(oldpasswordText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(26, 26, 26)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(newpassword)
.add(newpasswordText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(28, 28, 28)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(newpassword1)
.add(newpasswordText2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(40, 40, 40)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jButton2)
.add(jButton1))
.addContainerGap(27, Short.MAX_VALUE))
);
layout.linkSize(new java.awt.Component[] {newpasswordText, newpasswordText2, oldpasswordText, userIDText}, org.jdesktop.layout.GroupLayout.VERTICAL);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
// TODO 将在此处添加您的处理代码:
new ChangePasswordFrame(ChangeFrame.this,userIDText.getText(),String.valueOf(oldpasswordText.getPassword()),String.valueOf(newpasswordText.getPassword()),String.valueOf(newpasswordText2.getPassword()));
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
// TODO 将在此处添加您的处理代码:
dispose();
}//GEN-LAST:event_jButton1ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ChangeFrame(new javax.swing.JFrame(), true).setVisible(true);
}
});
}
// 变量声明 - 不进行修改//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel newpassword;
private javax.swing.JLabel newpassword1;
private javax.swing.JPasswordField newpasswordText;
private javax.swing.JPasswordField newpasswordText2;
private javax.swing.JLabel oldpassword;
private javax.swing.JPasswordField oldpasswordText;
private javax.swing.JLabel userID;
private javax.swing.JTextField userIDText;
// 变量声明结束//GEN-END:variables
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -