java专项项目ATM银行系统源代码

上传人:m**** 文档编号:564810503 上传时间:2023-10-01 格式:DOCX 页数:64 大小:45.16KB
返回 下载 相关 举报
java专项项目ATM银行系统源代码_第1页
第1页 / 共64页
java专项项目ATM银行系统源代码_第2页
第2页 / 共64页
java专项项目ATM银行系统源代码_第3页
第3页 / 共64页
java专项项目ATM银行系统源代码_第4页
第4页 / 共64页
java专项项目ATM银行系统源代码_第5页
第5页 / 共64页
点击查看更多>>
资源描述

《java专项项目ATM银行系统源代码》由会员分享,可在线阅读,更多相关《java专项项目ATM银行系统源代码(64页珍藏版)》请在金锄头文库上搜索。

1、/初始密码为123456import java.awt.*;import java.awt.event.*;import javax.swing.*;publicclassMyATMextends JFrame implements ActionListenerJPanel panelfirst,panelmain,panel3,panel4,panel5,panel6,panel7,panelchangepwd,panelchangepwded,panelsave,panelsaved,panelremain,paneltrans,paneltransed,panelmobile,panel

2、mobiled,panelconsult;JButton btn0,btn1,btn2,btn3,btn4,btn5,btn6,btn7,btn8,btn9,btn10,btnsure,btnback,btnok,btncard,btngetcard,btnincard;JButton btn00,btn01,btn02,btn03,btn04,btn05,btn06,btn07,btn08,btn09,btn010,btnback1,btnremain,btnremain1,btnremain2;JButton btn000,btn001,btn002,btn003,btn004,btn00

3、5,btn006,btn007,btn008,btn009,btn100,btn200,btn300,btn1000,btn500,btnsure1,btnback2,btn0010,btnquok1,btnquok2,btnquok3,btnquok4;JButton btnpwd,btnpwd1,btnpwd2,btnpwd3,btnpwd4,btn11,btn12,btn13,btn14,btn15,btn16,btn17,btn18,btn19,btn20,btnsave,btnsave1,btnsave2,btnsaved,btnsaved1,btnsaved2,btnsaved3;

4、JButton btntra,btntra1,btntra2,btntraed,btntraed1,btn21,btn22,btn23,btn24,btn25,btn26,btn27,btn28,btn29,btn30,btncon,btncon1;JButton btnmo,btnmo1,btnmo2,btnmo30,btnmo50,btnmo100,btnmo200,btnmo500,btnmo10,btnmo11,btnmo12,btnmo13,btnmo14,btnmo15,btnmo16,btnmo17,btnmo18,btnmo19,btnmoed,btnmoed1;JTextFi

5、eld txt2,txttrans,txttrans1,txttrans2,txtmo,txtmo1;JLabel lbljixu,lblpwd,lblwrong,lblqukuan,lblquok1,lblquok2,lblpwd1,lblpwd2,lblpwd3,lblpwd4,lblsave,lblsave1,lblsaved,lblremain,lblremain1,lbltra,lbltra1,lbltra2,lbltraed,lbltraed1;JLabel lblwel,lblwel1,lblmo,lblmo1,lblmo2,lblmo3,lblmoed,lblmoed1,lbl

6、con,lblcon1;JPasswordField txt1,txtpwd,txtpwd1;Container container;CardLayout Layout;intmoney,savemoney,mobilemoney=0;doublelastmoney,trainsmoney;String userpwd,cardnum,trains,username;booleanflag=true,flag1=false,flag2=false,flag3=true,flag4=false,flag5=false;/构造措施public MyATM()super(罗灿银行);this.set

7、Size(435,350);this.setLocation(500, 250);this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );/设立不可变化窗口大小this.setResizable(false); /设立程序小图标this.setIconImage(this.getToolkit().getImage(imageshaizei.jpg);/布局publicvoid setLayout()/用卡片布局Layout=new CardLayout();container=getContentPane();container.setLay

8、out(Layout);/添加第一张卡片panelfirst=new JPanel(null);/设立卡片旳背景颜色panelfirst.setBackground(new Color(119,119,253);lbljixu=new JLabel(请放入磁卡,然后继续操作);/设立卡片在Panel中旳位置lbljixu.setBounds(140,90,350,30);/为第一张卡片添加一种Labelpanelfirst.add(lbljixu);/为第一张卡片添加一种按钮btncard=new JButton(继续);btncard.setBounds(310,180,80,30);/为按

9、钮注册事件监听器btncard.addActionListener(this);/开始时设立按钮不可按btncard.setEnabled(false);panelfirst.add(btncard);/为第一张卡片添加一种按钮btngetcard=new JButton(取卡);btngetcard.setEnabled(false);btngetcard.setBounds(310,220,80,30);btngetcard.addActionListener(this);panelfirst.add(btngetcard);/为第一张卡片添加一种按钮btnincard=new JButt

10、on(插卡);btnincard.setBounds(40,220,80,30);btnincard.addActionListener(this);panelfirst.add(btnincard);container.add(panelfirst,first);/添加登录输入密码卡片panelmain=new JPanel(null);panelmain.setBackground(new Color(119,119,253);lblpwd=new JLabel(请输入您旳银行卡密码:);panelmain.add(lblpwd);lblpwd.setBounds(150, 20, 150

11、, 30);/设立文本框为密码型txt1=new JPasswordField(12);/文本框不可选中txt1.enable(false);panelmain.add(txt1);/文本框旳输入内容用*显示txt1.setEchoChar(*);txt1.setBounds(115,50,200,30);/添加选择按钮btnsure=new JButton(拟定);btnsure.addActionListener(this);panelmain.add(btnsure);btnsure.setBounds(70,160,80,30);/添加重输按钮btn010=new JButton(重输

12、);btn010.addActionListener(this);panelmain.add(btn010);btn010.setBounds(175,160,80,30);btnback=new JButton(退出);btnback.addActionListener(this);panelmain.add(btnback);btnback.setBounds(280,160,80,30);lblwrong=new JLabel(请注意保护好您旳密码!);panelmain.add(lblwrong);lblwrong.setBounds(150,90,200,30);/添加输入按钮btn

13、01=new JButton(1);btn01.addActionListener(this);panelmain.add(btn01);btn01.setBounds(45,210,60,30);btn02=new JButton(2);btn02.addActionListener(this);panelmain.add(btn02);btn02.setBounds(115,210,60,30);btn03=new JButton(3);btn03.addActionListener(this);panelmain.add(btn03);btn03.setBounds(185,210,60

14、,30);btn04=new JButton(4);btn04.addActionListener(this);panelmain.add(btn04);btn04.setBounds(255,210,60,30);btn05=new JButton(5);btn05.addActionListener(this);panelmain.add(btn05);btn05.setBounds(325,210,60,30);btn06=new JButton(6);btn06.addActionListener(this);panelmain.add(btn06);btn06.setBounds(4

15、5,260,60,30);btn07=new JButton(7);btn07.addActionListener(this);panelmain.add(btn07);btn07.setBounds(115,260,60,30);container.add(panelmain,main);btn08=new JButton(8);btn08.addActionListener(this);panelmain.add(btn08);btn08.setBounds(185,260,60,30);btn09=new JButton(9);btn09.addActionListener(this);panelmain.add(btn09);btn09.setBounds(255,260,60,30);btn00=new JButton(0);btn00.addActionListener(this);panelmain.add(btn00);

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 习题/试题

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号