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

📄 cha_xun_yu_a.java

📁 GUI银行管理系统,包括一系列的用户操作功能
💻 JAVA
字号:
package denglu;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;

import java.awt.*;
import java.awt.event.*;
class cha_xun_yu_a extends Panel implements ActionListener{
	JFrame a=new JFrame("XX");
	Panel p,q;
	JButton bnt1,bnt2;
	TextField text1,text2,text3,text4;
	Label l1,l2,l3,l4;
	cha_xun_yu_a(){
		a.setLayout(new BorderLayout());
		a.setBounds(200,150,520,300);
		bnt1=new JButton ("退  出");
		bnt1.addActionListener(this);
		bnt1.setBounds(300,200,200,20);
		bnt2=new JButton ("返回");
		bnt2.setBounds(10,200,200,20);
		bnt2.addActionListener(this);
		l1=new Label ("您是");
		l1.setBounds(0,0,40,20);
		p=new Panel();
		q=new Panel();
		q.setLayout(null);
		q.setBounds(0,0,200,20);
		p.setLayout(null);
		l2=new Label("利息所产生的税费");
		l2.setBounds(10,40,200,20);
		l3=new Label("存款所产生的利息");
		l3.setBounds(10,80,200,20);
		l4=new Label("查询当前存款总余额");
		l4.setBounds(10,120,200,20);
		text1=new TextField();
		text1.setBounds(50,0,200,20);	
		text2=new TextField();
		text2.setBounds(300,40,200,20);
		text3=new TextField();
		text3.setBounds(300,80,200,20);
		text4=new TextField();
		text4.setBounds(300,120,200,20);
//		text1.setText(yan_zhen.name);
//		text4.setText(yan_zhen.yue);
//		text2.setText(yan_zhen.lixi);
//		text3.setText(yan_zhen.shuifei);
		p.add(l2);p.add(text2);
		p.add(l3);p.add(text3);
		p.add(l4);p.add(text4);
		p.add(bnt1);p.add(bnt2);
		q.add(l1);
		q.add(text1);
		a.add(q,BorderLayout.NORTH);
		a.add(p,BorderLayout.CENTER);	
		a.setVisible(true);
		a.validate();
		a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
//		cha_xun_yu_e win=new cha_xun_yu_e();
	}
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		if(e.getSource()==bnt1){
			System.exit(0);
		}
		if(e.getSource()==bnt2){
//			new yan_zhen();
			a.dispose();
		}
	}
}

⌨️ 快捷键说明

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