2022年java考勤管理系统数据库实现 .pdf
《2022年java考勤管理系统数据库实现 .pdf》由会员分享,可在线阅读,更多相关《2022年java考勤管理系统数据库实现 .pdf(11页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、1 4. 2 设 计 代 码Jav a 源 程 序 :imp or t ja va.awt.*;imp or t ja va.awt.even t.*;imp or t ja va x. sw ing.*;imp or t ja va.awt.*;imp or t ja va.sql.*;imp or t ja va.lan g.*;imp or t ja va.util.*;imp or t ja va x. sw ing.tab le.*;imp or t ja va.m at h.*;cla ss D B_ LS impl emen ts A ct io nL isten er JFr
2、ame fr ame= ne w J Fr ame( 欢 迎 进 入 LS 工 资 管 理 系 统 ) ;JLa be l la be l= ne w J La be l(0 9 网 络2_5 4_ 李 胜 , JL ab el.CENTER);JBu tton b ut to n1 =ne w JB ut to n( 进 入 系 统 ) ;JBu tton b ut to n2 =ne w JB ut to n( 退 出 系 统 ) ;Ima ge Ic on im=ne w Image Ic on ( 1. jp g) ;JLa be l a1 =n ew J Lab el (im);vo
3、id Cr ea te ()JPa ne l pc on te nt Pan e= (J Pa ne l)frame.g et Co nt en tP an e();JPa ne l pc on te nt Pan e1 =n ew J Pa ne l();pco nt en tP an e. ad d(lab el );pco nt en tP an e. se tLa yo ut (n ew F lo wLayo ut ();pco nt en tP an e. ad d(b ut to n1 );pco nt en tP an e. ad d(b ut to n2 );pco nt en
4、 tP an e. ad d(n ew L ab el ( );pco nt en tP an e. ad d(a 1) ;pco nt en tP an e. se tBa ck gr ou nd (C ol or.gree n) ;pco nt en tP an e. se tVisi bl e( tr ue );but to n1.add ActionL is te ne r( th is );b ut to n2.addA ct io nL is te ner (thi s) ;frame.s et Defa ul tCl os eOpe ra tion (J Fra me.E XI
5、T_ ON_CLOSE) ;frame.p ac k( );frame.s et Bo un ds (20 0, 10 0, 55 0, 60 0) ;frame.s et Vi si bl e(tru e) ; pub lic st at ic v oid m ai n( St ring args )DB_LS d ome= ne w DB_LS () ;dome. Cr ea te () ; pub lic vo id ac tion Pe rf or med(A ct io nE ve nt e )名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - -
6、- - - - - - 名师精心整理 - - - - - - - 第 1 页,共 11 页 - - - - - - - - - 2 if(bu tton 1. eq ua ls(e. ge tS ou rc e( )DL dl =n ew D L( );dl.cr ea te () ; i f(bu tton 2.e qu al s( e. ge tS ou rce () ) / 退 出Sys te m. ex it(0 ); cla ss D L im pl ement s Action Li st ene rJFr ame fr ame= ne w J Fr ame( 职 工 / 管 理
7、员 登 陆 );JLa be l la be l1 =n ew JL ab el ( 用 户 名 );JLa be l la be l2 =n ew JL ab el ( 密 码 ) ;JBu tton log on Button1 =n ew J Bu tton ( 管 理 员 登 录 );JBu tton log on Button2 =n ew J Bu tton ( 职 工 登 录 );JBu tton c an ce lB utton =n ew J Bu tton ( 退 出 );JTe xt Fi el d t1 =n ew JT ex tF ie ld (0 );JTe xt
8、Fi el d t2 =n ew JT ex tF ie ld (0 );Ima ge Ic on im=ne w Image Ic on ( 2. jp g) ;JLa be l a2 =n ew J Lab el (im);JTe xt Fi el d us er name= ne w JT ex tF ie ld(9) ;JPa ss word Fi el d pas sw or d= ne w JP as swo rd Fi el d( 9) ;void cr ea te ()JPa ne l p= (J Pane l)fra me.g et Cont en tPa ne ();JPa
9、 ne l p1 =n ew J Pan el () ;p.s et La yo ut (n ew FlowLa yo ut () );p.a dd (lab el 1) ;p.s et Si ze (5 ,5 );p.s et Lo ca tion (4 ,8);p.a dd (u se rn ame) ;p.s et Si ze (1 00 ,2 00) ;p.s et Lo ca tion (8 00, 80 0) ;p.a dd (lab el 2) ;p.s et Si ze (5 0, 20 );p.s et Lo ca tion (4 0,8 0) ;p.a dd (p as s
10、w or d) ;p.s et Si ze (1 00 ,2 0);p.s et Lo ca tion (8 0,1 20 );p.a dd (log on Button1 );p.a dd (n ew J La be l( ) ;名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 11 页 - - - - - - - - - 3 p.a dd (log on Button2 );p.a dd (n ew J La be l( ) ;p.a dd (c an ce lB ut
11、 ton );p.a dd (n ew J La be l( ) ;p.a dd (a 2) ;p.a dd (t 1) ;p.a dd (t 2) ;p.s et Back gr ou nd (Co lo r. bl ue );p.s et Vi si bl e( true) ;log on Button 1. ad dAc tion Li st en er (t his);log on Button 2. ad dAc tion Li st en er (t his);c an ce lB utton.add Ac tion Lis t ene r( th is );f ra me.s e
12、tD ef au ltCl os eOper at io n( JF ra me.E XIT _ON_ CLOSE) ;frame.p ac k( );f ra me.s etB ou nd s( 20 0, 10 0,7 50 ,5 50 );f ra me.s etV isib le (tru e) ; pub lic vo id a ct ion Perfor med( ActionE ve nt e )if(lo go nB ut to n1.equa ls (e.get So ur ce( ) ) &(u se rn ame.g et Text ().equ al s(12 3 )=
13、 =t ru e) &(pa sswo rd.get Text ().equa ls ( 12 3 )= =t rue ) GZGLZJM g z= ne w GZGLZJM() ;gz.cr ea te () ; else JOpt io nP an e.sho wMes sa ge Di al og( nu ll,对 不 起 , 你 输 入 的 密 码 错 误 !);if(lo go nBut to n2.equa ls (e.get Sour ce( ) &(u se rn ame. get Text ().equ al s(t1. ge tT ex t() =true) &(p as
14、sw or d.g et Text ().equ al s(t2. ge tT ex t() =t ru e) )XK xk =n ew X K( );xk.cr ea te () ;Con ne ct ion c on ;Sta te ment sq l;Res ul tS et rs ;Vec to r vec to r= ne w Ve ct or();t ry Cla ss.for Name( sun.jdb c. od bc.Jdb cOd bc Dr iv er ) ; cat ch (Cl as sN otF ou nd Ex ce pt io n e1) Sys te m. o
15、u t.pr in tln( + e1 ); try con = D rive rM an age r. ge tC on ne ct io n(jd bc :o db c: 12 3, , ) ;名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 11 页 - - - - - - - - - 4 sql =con.cre at eSta te ment(Resu ltSe t.TYPE_ SCROLL _S ENSI TIV E, Res ultSe t.CONCUR_RE
16、AD_ONLY) ;sql.exe cu te Quer y(SELE CTGno ,mmFROM Y WHEREGno = +t 1.g et Te xt ()+AN Dmm=+ t2.get Te xt ();ca tc h (S QLEx ce ption e 1) Sys te m. ou t.pr in tln(e 1) ;if(ca nc el Bu tton.equa ls (e.get So ur ce( ) )Sys te m. ex it(0 ); cla ss G ZGLZJM ex te nd s JF ra me impl emen ts A ct io nLi st
17、 en er JFr ame f= ne w JF ram e( 工 资 管 理 系 统 ) ;JBu tton b 1= ne w JBu tton ( 津 贴 管 理 );JBu tton b 2= ne w JBu tton ( 总 查 询 ) ;JBu tton b 3= ne w JBu tton ( 工 资 管 理 );JBu tton b 4= ne w JBu tton ( 后 勤 管 理 );JBu tton b 6= ne w JBu tton ( 员 工 个 人 信 息 管 理 );JBu tton b 5= ne w JBu tton ( 返 回 );Ima ge Ic
18、 on im=ne w Image Ic on ( 3. jp g);JLa be l a3 =n ew J Lab el (im);void cr ea te ()JPa ne l p= (J Pane l)f.get Co nt en tP an e();J Pa ne l p1= ne w JP an el () ;p.set La you t(ne w Fl owLa you t() ;p.add (b 1);p.add (n ew JL ab el ( );p.add (b 6);p.add (n ew JL ab el ( );p.add (b 3);p.add (n ew JL
19、ab el ( );p.add (b 4);p.add (n ew JL ab el ( );p.add (b 2);p.add (n ew JL ab el ( );p.add (b 5);p.add (a 3);p.set Ba ckg ro un d( Colo r.red );p.set Vi sib le (t ru e) ;b 1. ad dA ction Li st en er (this );名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 11 页 - -
20、 - - - - - - - 5 b 2. ad dA ction Li st en er (this );b 3. ad dA ction Li st en er (this );b 4. ad dA ction Li st en er (this );b 5. ad dA ction Li st en er (this );b 6. ad dA ction Li st en er (this );f.set Bo und s( 20 0, 10 0, 80 0,6 00 );f.set Vi sib le (t ru e) ; pub lic vo id a ct ion Perfor m
21、ed( ActionE ve nt e )if(b5.equ al s( e. get Sour ce () ) / / 返 回DL d= ne w DL() ;f.dispo se () ; if(b1.equ al s( e. get Sour ce () ) / / 津 贴 管 理JTGL jt=n ew J TGL() ;jt.cr ea te () ; if(b6.equ al s( e. get Sour ce () ) / / 员 工 个 人 信 息 管 理YGG L yg =n ew Y GGL() ;yg. cr ea te () ;if(b2.equ al s( e. ge
22、t Sour ce () ) / / 查 询XK xk =n ew X K( );xk. cr ea te () ; if(b4.equ al s( e. get Sour ce () ) / / 后 勤 管 理KQG L kq =n ew K QGL() ;kq. cr ea te () ; if(b3.equ al s( e. get Sour ce () ) / / 工 资 管 理GZGL gz =ne w GZGL() ;gz. cr ea te () ; class K QGL im pl ement s Ac tion Li st ene rJFr ame f= ne w JF r
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年java考勤管理系统数据库实现 2022 java 考勤 管理 系统 数据库 实现
限制150内