📄 loginbuttonlistener.java
字号:
//*****************************************************************************
// 名称:确定按钮LoginButtonListener
//作用:响应确定按钮操作
//*****************************************************************************
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class LoginButtonListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
if(e.getActionCommand().equals("登陆 / 确定"))
{
if((StudDrawGUI.x.lbCardtype.getText()).equals("注册并登陆")) //响应登陆按钮
StudDrawGUI.b.Login
(StudDrawGUI.x .txtName.getText(),StudDrawGUI.x .txtPassword.getText());
if(StudDrawGUI.x.lbCardtype.getText()=="修改密码") //响应修改密码按钮
StudDrawGUI.b.Repassword
(Integer.parseInt(StudDrawGUI.x .txtNumber.getText()),StudDrawGUI.x .txtPassword.getText(),StudDrawGUI.x .txtNewpassword.getText());
if(StudDrawGUI.x.lbCardtype.getText()=="添加金额") //响应添加金额按钮
StudDrawGUI.b.Addmoney
(Integer.parseInt(StudDrawGUI.x .txtNumber.getText()),StudDrawGUI.x .txtPassword.getText(),Integer.parseInt(StudDrawGUI.x .txtAddmoney.getText()));
if(StudDrawGUI.x.lbCardtype.getText()=="消----费") //响应消费按钮
StudDrawGUI.b.Consume
(Integer.parseInt(StudDrawGUI.x .txtNumber.getText()),StudDrawGUI.x .txtPassword.getText(),Integer.parseInt(StudDrawGUI.x .txtConsume.getText()));
if(StudDrawGUI.x.lbCardtype.getText()=="查询余额") //响应查询按钮
StudDrawGUI.b.Find(Integer.parseInt(StudDrawGUI.x .txtNumber.getText()),StudDrawGUI.x .txtPassword.getText());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -