📄 chaxun_print_m200.java
字号:
package ATM_Events;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import javax.swing.JTextField;
import ATM_Dialog.InforDialog;
import ATM_Frame.ATM_window;
import ATM_ToolClass.CompMoney;
public class Chaxun_Print_M200 implements ActionListener{
ATM_window awindow;
private JLabel restmoney;
private JTextField restmoneytf;
public Chaxun_Print_M200(ATM_window aw){
awindow=aw;
restmoney=new JLabel("你卡上的余额为: ");
restmoney.setBounds(20, 85, 100, 25);
restmoneytf=new JTextField();
restmoneytf.setBounds(50, 110, 140, 25);
restmoneytf.setHorizontalAlignment(JTextField.CENTER);
restmoneytf.setEditable(false);
}
public void actionPerformed(ActionEvent e) {
switch(awindow.getTr2()){
case 0: //无行为
break;
case 1: //显示余额
ATM_window.setRestTime(30);
awindow.getDisplayPane().removeAll();
awindow.getDisplayPane().add(restmoney);
awindow.getDisplayPane().add(restmoneytf);
awindow.getDisplayPane().add(awindow.getReture());
awindow.getDisplayPane().repaint();
restmoneytf.setText(String.valueOf(ATM_window.getAllMoney()));
awindow.setTl1(0);
awindow.setTl2(0);
awindow.setTl3(0);
awindow.setTl4(0);
awindow.setTr1(0);
awindow.setTr2(0);
awindow.setTr3(0);
awindow.setTr4(2);
break;
case 3: //打印清单
ATM_window.setRestTime(30);
InforDialog infod=new InforDialog(awindow);
awindow.setTn(false);
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();
ATM_window.setTakeoutMoney(0,"清零");
awindow.setTl1(0);
awindow.setTl2(0);
awindow.setTl3(0);
awindow.setTl4(2);
awindow.setTr1(1);
awindow.setTr2(1);
awindow.setTr3(1);
awindow.setTr4(0);;
break;
case 2: //200
new CompMoney(awindow).commoney(200);
break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -