欢迎来到天天文库
浏览记录
ID:37913628
大小:27.50 KB
页数:5页
时间:2019-06-02
《ATM小程序java》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、packagepg2;importjava.awt.*;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.awt.event.ItemEvent;importjava.awt.event.ItemListener;importjava.awt.event.WindowEvent;importjava.awt.event.WindowListener;publicclasslx2extendsFrameimplementsItemLis
2、tener,WindowListener,ActionListener{TextAreat;TextFieldtt;Labell;Stringname1[]={"<","<<","<<<","<<<<"};Stringname2[]={"1","2","3","4","5","6","7","8","9","取消","0","确定"};Buttonbt1[]=newButton[name1.length];;Buttonbt2[]=newButton[name2.length];;lx2(){super("ATM");setSize(500,
3、600);t=newTextArea("rr欢迎使用ATM系统rr",12,50);Fontf=newFont("黑体",Font.BOLD,15);setFont(f);l=newLabel("请输入密码:");bt1=newButton[name1.length];bt2=newButton[name2.length];for(inti=0;i4、0;i5、i++){pp.add(bt1[i]);}Panelp1=newPanel();p1.add(p,BorderLayout.WEST);p1.add(pp,BorderLayout.EAST);Panelppp=newPanel();ppp.setLayout(newGridLayout(4,3,10,11));for(inti=0;i6、ue);addWindowListener(this);}publicvoiditemStateChanged(ItemEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowActivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosed(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosing(Win7、dowEventarg0){System.exit(0);}publicvoidwindowDeactivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowDeiconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowIconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowOp8、ened(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidactionPerformed(Act
4、0;i5、i++){pp.add(bt1[i]);}Panelp1=newPanel();p1.add(p,BorderLayout.WEST);p1.add(pp,BorderLayout.EAST);Panelppp=newPanel();ppp.setLayout(newGridLayout(4,3,10,11));for(inti=0;i6、ue);addWindowListener(this);}publicvoiditemStateChanged(ItemEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowActivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosed(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosing(Win7、dowEventarg0){System.exit(0);}publicvoidwindowDeactivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowDeiconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowIconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowOp8、ened(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidactionPerformed(Act
5、i++){pp.add(bt1[i]);}Panelp1=newPanel();p1.add(p,BorderLayout.WEST);p1.add(pp,BorderLayout.EAST);Panelppp=newPanel();ppp.setLayout(newGridLayout(4,3,10,11));for(inti=0;i6、ue);addWindowListener(this);}publicvoiditemStateChanged(ItemEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowActivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosed(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosing(Win7、dowEventarg0){System.exit(0);}publicvoidwindowDeactivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowDeiconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowIconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowOp8、ened(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidactionPerformed(Act
6、ue);addWindowListener(this);}publicvoiditemStateChanged(ItemEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowActivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosed(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowClosing(Win
7、dowEventarg0){System.exit(0);}publicvoidwindowDeactivated(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowDeiconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowIconified(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidwindowOp
8、ened(WindowEventarg0){//TODOAuto-generatedmethodstub}publicvoidactionPerformed(Act
此文档下载收益归作者所有