📄 makesurepassword.java
字号:
package ATM_ToolClass;
import javax.swing.JOptionPane;
import ATM_Frame.ATM_window;
public class MakesurePassword {
private ATM_window awindow;
public MakesurePassword(ATM_window aw){
awindow=aw;
}
public void makesurepassword(){
if(awindow.getPasswordtf().getText().equals("")){
awindow.getPasswordtf().setText("");
JOptionPane.showMessageDialog(awindow, "密码未修改,还为原密码","密码修改成功",JOptionPane.WARNING_MESSAGE);
}else if(awindow.getPasswordtf().getText().length()!=6){
awindow.getPasswordtf().setText("");
JOptionPane.showMessageDialog(awindow, "密码输入有误","密码修改失败",JOptionPane.ERROR_MESSAGE);
}else{
awindow.setMima(awindow.getPasswordtf().getText());
awindow.getPasswordtf().setText("");
JOptionPane.showMessageDialog(awindow, "密码修改成功","密码修改成功",JOptionPane.INFORMATION_MESSAGE);
}
ATM_window.setRestTime(30);
awindow.getDisplayPane().removeAll();
awindow.getDisplayPane().add(awindow.getChaxun());
awindow.getDisplayPane().add(awindow.getTakeout());
awindow.getDisplayPane().add(awindow.getXgmima());
awindow.getDisplayPane().add(awindow.getExitcard());
awindow.getDisplayPane().repaint();
awindow.setTl1(0);
awindow.setTl2(0);
awindow.setTl3(0);
awindow.setTl4(2);
awindow.setTr1(1);
awindow.setTr2(1);
awindow.setTr3(1);
awindow.setTr4(0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -