下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
packageB;importjava。awt。Color;importjava.awt。Font;importjava。awt。event。ActionEvent;import。ActionListener;import;import;importjavax.swing。JFrame;importjavax。swing.JLabel;importjavax.swing。JPasswordField;import;publicclassCextendsJFrame{staticCd;JButtonjb1,jb2,jb3;C(){this.setTitle("登岸”);this.setSize(600,400);this.setLocation(600,400);JLabeljl=newJLabel(newImageIcon("g://6.jpg"));增添背景Fontf=newFont("Serif",Font.BOLD,14);設(shè)置字體JTextFieldjt=newJTextField();JPasswordFieldjp=newJPasswordField();this。setLayout(null);jb1=newJButton(”登岸");jb1。addActionListener(newMyListener());//增添監(jiān)聽jb1。setBackground(Color.gray);設(shè)置背景顏色jb2=newJButton(”注冊”);jb2。setBackground(Color.gray);jt。setBounds(90,150,90,20);jp。setBounds(90,190,90,20);jb1。setBounds(50,250,60,20);jb2。setBounds(120,250,60,20);this。add(jt);this。add(jp);this。add(jb1);this.add(jb2);this。setLayout(null);jl.setBounds(0,0,600,400);設(shè)置背景大小this。add(jl}
);class
MyListener
implements
ActionListener
{public
void
actionPerformed(ActionEventarg0){d。dispose(newjiemian
);()
;}}public
static
void
main(String
[]
args){d=newC(
);d.setDefaultCloseOperation(JFrame.
DISPOSE_ON_CLOSE
);d。setVisible
(true
);}}packageB;importjava.awt.FlowLayout;importjava。awt。event。ActionEvent;importjava。awt.event。ActionListener;importjavax.swing。ImageIcon;importjavax.swing。JButton;importjavax。swing.JFrame;import;publicclassjiemianextendsJFrame{JButtonjb1,jb2,jb3,jb4,jb5,jb6;staticjiemiano;jiemian(){this。setVisible(true);this。setTitle(”圖書室管理系統(tǒng)”);this。setSize(600,400);this.setLocation(300,200);JLabeljl=newJLabel(newImageIcon(”g://2。jpg"));//增添背景jb1=newJButton(”圖書采買");jb2=newJButton(”圖書入庫”);jb3=newJButton(”圖書流通”);jb4=newJButton(”讀者管理”);jb5=newJButton("統(tǒng)計(jì)查問”);jb6=newJButton(”系統(tǒng)設(shè)置");this。add(jb1);this。add(jb2);this。add(jb3);this.add(jb4);this。add(jb5);this.add(jb6);this.setLayout(null);jl.setBounds(0,0,600,400);設(shè)置背景大小this.add(jl);this.setLayout(newFlowLayout());jb1.addActionListener(newMyListener1());jb2。addActionListener(newMyListener2( ));jb3.addActionListener(newMyListener3());jb4.addActionListener(newMyListener4());jb5。addActionListener(newMyListener5());jb6.addActionListener(newMyListener6());this。setVisible(true);}classMyListener1implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e。getSource( )==jb1){newjiemian1();o.dispose();}}}classMyListener2implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e。getSource( )==jb2){newjiemian2();o.dispose( );}}}classMyListener3implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e。getSource()==jb3){newjiemian3();o.dispose();}}}classMyListener4implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e.getSource( )==jb4){newjiemian4();o.dispose();}}}classMyListener5implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e.getSource()==jb5){newjiemian5();o.dispose( );}}}classMyListener6implementsActionListener{publicvoidactionPerformed(ActionEvente){if(e.getSource()==jb6){newjiemian6();o。dispose( );}}}publicstaticvoidmain(String[]args){o=newjiemian();o。setDefaultCloseOperation(JFrame。EXIT_ON_CLOSE);o.setVisible(true);}}packageB;importjava。awt.FlowLayout;importjava。awt。event.ActionEvent;importjava。awt。event.ActionListener;importjavax.swing。ImageIcon;importjavax.swing。JButton;importjavax.swing.JFrame;importjavax.swing。JLabel;publicclassjiemian1extendsJFrame{JButtonjb3;staticjiemian1o;jiemian1(){this.setVisible(true);this。setTitle(”圖書采買”);this。setSize(600,400);this。setLocation(300,200);JLabeljl=newJLabel(newImageIcon(”g://2.)jpg");//增添背景JButtonjb1=newJButton(”訂單查問”);JButtonjb2=newJButton(”新書通告");jb3=newJButton("返回");this。add(jb1);this。add(jb2);this.add(jb3);this。setLayout(null);jl.setBounds(0,0,600,400);//設(shè)置背景大小this。add(jl);this。setLayout(newFlowLayout( ));this.setVisible(true);jb3.addActionListener(newMyListener3());}classM
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025山東濟(jì)南市檢察機(jī)關(guān)招聘聘用制書記員25人備考核心題庫及答案解析
- 2025遼寧沈陽盛京資產(chǎn)管理集團(tuán)有限公司所屬子公司沈陽華海錕泰投資有限公司所屬子公司招聘5人筆試重點(diǎn)題庫及答案解析
- 2026年長沙市中小學(xué)素質(zhì)教育實(shí)踐基地岳麓營地編外合同制教師、教官招聘備考題庫及1套完整答案詳解
- 2025年寶鈦集團(tuán)有限公司高層次人才招聘考試核心題庫及答案解析
- 2025年蚌埠自貿(mào)區(qū)城發(fā)人力資源有限公司第八期招聘2名考試重點(diǎn)試題及答案解析
- 2025年博思睿人力招聘(派遣至海寧市袁花鎮(zhèn)百溪工業(yè)社區(qū))備考題庫完整答案詳解
- 2025年鯉城區(qū)第五中心小學(xué)誠聘合同制頂崗教師備考題庫及一套答案詳解
- 2025年菏澤檢察機(jī)關(guān)公開招聘59人備考題庫有答案詳解
- 2025年鄭州九中教育集團(tuán)招聘教師13名考試重點(diǎn)試題及答案解析
- 2025年12月江蘇南京市江北新區(qū)教育局所屬事業(yè)單位招聘教師20人考試核心題庫及答案解析
- 手機(jī)拍照入門教程
- 2025年中職物理(物理基礎(chǔ)知識)試題及答案
- “現(xiàn)代控制理論”教學(xué)改革與創(chuàng)新實(shí)踐
- (新教材)部編人教版三年級上冊語文全冊核心素養(yǎng)教案(教學(xué)反思無內(nèi)容+二次備課版)
- 企業(yè)預(yù)算規(guī)劃及成本控制管理表控制成本
- 2025考務(wù)人員網(wǎng)上培訓(xùn)考試真題及答案
- 捕撈作業(yè)安全協(xié)議書
- 2025年包頭輕工職業(yè)技術(shù)學(xué)院教師招聘考試試題及答案
- 孕產(chǎn)婦心理健康指南
- 兒科醫(yī)生規(guī)培述職報(bào)告
- 東北林業(yè)大學(xué)19-20高數(shù)A1期末考試
評論
0/150
提交評論