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

📄 compmoney.java

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

import javax.swing.JLabel;
import javax.swing.JOptionPane;

import ATM_Events.NumberEvent;
import ATM_Frame.ATM_window;

public class CompMoney {
	private ATM_window awindow;
	
	public CompMoney(ATM_window aw){
         awindow=aw;
}
	public void commoney(int tempmoney){
        ATM_window.setRestTime(30);
        
  if(tempmoney-ATM_window.getAllMoney()<=0){
    ATM_window.setAllMoney(ATM_window.getAllMoney()-tempmoney);
	ATM_window.setTakeoutMoney(tempmoney);
	awindow.getDisplayPane().removeAll();
	JLabel tishi=new JLabel("操作成功,请取出钞票");
	tishi.setBounds(50, 80, 150, 30);
	awindow.getDisplayPane().add(tishi);
	JLabel print=new JLabel("打印清单");
	print.setBounds(195, 50, 60, 30);
	awindow.getDisplayPane().add(print);
	awindow.getDisplayPane().add(awindow.getTakeout());
	awindow.getDisplayPane().add(awindow.getReture());
	awindow.getDisplayPane().repaint();
	awindow.setTl1(0);
    awindow.setTl2(0);
    awindow.setTl3(0);
    awindow.setTl4(0);
    awindow.setTr1(1);
    awindow.setTr2(3);
    awindow.setTr3(0);
    awindow.setTr4(2);
}else{
	awindow.getDisplayPane().removeAll();
	JLabel tishi=new JLabel("操作失败,余额不足");
	tishi.setBounds(50, 80, 150, 30);
	awindow.getDisplayPane().add(tishi);
	awindow.getDisplayPane().add(awindow.getTakeout());
	awindow.getDisplayPane().add(awindow.getReture());
	awindow.getDisplayPane().repaint();
	awindow.setTl1(0);
    awindow.setTl2(0);
    awindow.setTl3(0);
    awindow.setTl4(0);
    awindow.setTr1(1);
    awindow.setTr2(0);
    awindow.setTr3(0);
    awindow.setTr4(2);
}
}

}

⌨️ 快捷键说明

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