📄 customerquery.java
字号:
package customer.services.frame;
import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import customer.services.action.CustomerAction;
import string.logic.GetCustomer;
import DBManager.SQLserver2000;
import MainFrame.MainFrame;
import MainFrame.MyFrame;
public class CustomerQuery extends MyFrame implements ActionListener {
/**
*
*/
private static final long serialVersionUID = 1L;
private JLabel username;
private JLabel money;
private JButton ok;
public CustomerQuery(MainFrame m) {
super(m);
initialize(m.getTitle());
}
private void initialize(String title) {
username = new JLabel();
username.setText("身份证号:"+new GetCustomer().getIDcard(title));
username.setFont(new Font("黑体",Font.BOLD,20));
username.setBounds(new Rectangle(115, 15, 200, 100));
String IDcard = new GetCustomer().getIDcard(title);
String result = new CustomerAction().getBalance(IDcard);
money = new JLabel();
money.setText("余额:"+result);
money.setFont(new Font("黑体",Font.BOLD,20));
money.setBounds(new Rectangle(115, 155, 200, 100));
ok = new JButton();
ok.setText("确定");
//ok.setFont(new Font("黑体",Font.BOLD,20));
ok.setBounds(new Rectangle(380, 335, 100, 30));
ok.addActionListener(this);
this.add(username);
this.add(money);
this.add(ok);
this.setTitle(title);
this.setBounds(300,200,520,390);
}
public static void main(String[] args) {
}
public void actionPerformed(ActionEvent e) {
if(m!=null)
m.setVisible(true);
dispose();
SQLserver2000.closeDB();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -