customerquery.java

来自「存款、取款、账户明细、系统备份、修改密码」· Java 代码 · 共 71 行

JAVA
71
字号
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 + =
减小字号Ctrl + -
显示快捷键?