⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compassword.java

📁 JAVA 方法写的 ATM自助银行系统 代码清晰明了
💻 JAVA
字号:
package ATM_ToolClass;

import javax.swing.JOptionPane;

import ATM_Events.NumberEvent;
import ATM_Frame.ATM_window;
import ATM_Events.NumberEvent;

public class ComPassword {
	private ATM_window awindow;
	private static int i=3;
	public ComPassword(ATM_window aw){
		awindow=aw;
	}
	
	public void compassword(){
	String PassWord=awindow.getPasswordtf().getText();
	if(!PassWord.equals(awindow.getMima())){
		i--;
		if(i!=0){
		JOptionPane.showMessageDialog(awindow, "密码输入有误", "密码错误!!!", JOptionPane.ERROR_MESSAGE);
		awindow.getPasswordtf().setText("");
		NumberEvent.setPassstr("");
		}else{
			JOptionPane.showMessageDialog(awindow,"密码输入3次错误,次卡已被没收","密码错误!!!",JOptionPane.ERROR_MESSAGE);
			System.exit(0);
		}
	}
	else{
		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 + -