简单职工管理系统_第1页
简单职工管理系统_第2页
简单职工管理系统_第3页
简单职工管理系统_第4页
简单职工管理系统_第5页
已阅读5页,还剩21页未读, 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

软件运行环境:MyEclipse出生年工作年新增一名职工:将新增职工对象按以字典方式职工管理文件中1男2张X345——————功能模块设计(如主程序模块设计查新删修排询增除改序职职职职职工工工工工对出对出生年月进行查询对工作年月进行查询button6.addActionListener(newActionListener()publicvoidactionPerformed(ActionEvent{try }catch(Exceptione1)}

}}

try{}catch(Exceptione)}try{}catch(Exceptione2)}publicvoidactionPerformed(ActionEvente)try }catch(Exceptione1)}}}}button3.addActionListener(newActionListener()publicvoidactionPerformed(ActionEvente)择要删除的信息

JOptionPane.showMessageDialog(null,"请选try}catch(Exceptione1)

}}}button4.addActionListener(newActionListener()publicvoidactionPerformed(ActionEvente)//TODOAuto-generatedmethodpaixucun[]=newpaixu[num];for(intm=0;m<num;m++){cun[m]=new

for(inttry{str=new }catch(Exceptione1)//TODOAuto-generatedcatchblock}}intn=cun.length;for(inti=1;i<n;i++){for(intj=0;j<n-i;j++){paixut=cun[j];cun[j]=cun[j+1];cun[j+1]=t;}}}for(inttry }catch(Exceptione1)//TODOAuto-generatedcatchblock}}}button8.addActionListener(newActionListener()publicvoidactionPerformed(ActionEventarg0)finalJFrameframe=newJFrame("查询");frame.setBounds(520,300,400,150);label7=newJLabel("请输入label7.setBounds(60,35,120,21);text7=newJTextField();text7.setBounds(180,35,120,21);button9=newButton("查询");button9.setBounds(170,70,60,button9.addActionListener(newActionListener(){publicvoidactionPerformed(ActionEvent{intpaixucun1[]=newpaixu[num];for(intm=0;m<num;m++){cun1[m]=newpaixu();}for(inttry{ }catch(Exceptione1)} }}"}}}

GUImain函数就不知从何写4天的努力之下,我才终于完成了这次的大作业。中途可谓重重,记得一开始在编写main函数12345importjava.awt.Button;importjava.awt.Color;importjava.awt.Container;importjava.awt.TextArea;importjava.awt.event.ActionEvent;importjava.awt.event.ActionListener;importjava.awt.event.WindowEvent;importjava.awt.event.WindowListener;importjava.awt.List;importjavax.swing.*;importpublicclassMain1extendsJFrame{privatestaticJFrameframe;privateJLabeltextJLabel;privateJLabeltextJLabel1;privateJLabeltextJLabel2;privateJLabeltextJLabel3;privateJLabeltextJLabel4;privateJLabeltextJLabel5;privateJLabeltextJLabel6;privateJLabeltextJLabel7;privateJLabelprivateButtonbutton1;privateButtonbutton2;privateButtonbutton3;privateButtonbutton4;privateButtonbutton5;privateButtonbutton8;privateButtonbutton9;privateButtonbutton10;privateJLabellabel1;privateJLabellabel2;privateJLabellabel3;privateJLabellabel8;privateJLabellabel9;privateJLabellabe21;privateJLabellabe22;privateJLabellabe23;privateJTextFieldtext1;privateJTextFieldtext2;privateJTextFieldtext3;privateJTextFieldtext8;privateJTextFieldtext9;privateJTextFieldtext11;privateJTextFieldtext12;privateJTextFieldtext13;privateJButtonbutton6;privateJLabellabel4;privateJLabellabel5;privateJLabellabel6;privateJLabellabel7;privateJLabellabe24;privateJLabellabe25;privateJLabellabe26;privateJLabellabe27;privateJLabellabe28;privateJTextFieldtext4;privateJTextFieldtext6;privateJTextFieldtext7;privateJTextFieldtext14;privateJTextFieldtext15;privateJTextFieldtext16;privateJTextFieldtext17;privateJButtonbutton7;LinListlinlist1=newLinList();publicintnum=0;publicintpublicMain1(){}privatevoidtextJLabel=newJLabel();textJLabel.setBounds(160,10,275,textJLabel1=newJLabel();textJLabel1.setBounds(185,70,100,20);textJLabel2=newJLabel();textJLabel2.setBounds(245,70,100,20);textJLabel3=newJLabel();textJLabel3.setBounds(3057010020);textJLabel4=newJLabel();textJLabel4.setBounds(3757010020);textJLabel5=newJLabel();textJLabel5.setBounds(4557010020);textJLabel6=newJLabel();textJLabel6.setBounds(5257010020);textJLabel7=newJLabel();textJLabel7.setBounds(5957010020);textJLabel8=newJLabel(); textJLabel8.setBounds(665,70,100,20);finalListlist=newList(500,false);list.setBounds(180,90,550,180);button8=newButton("查询");button8.setBounds(79016510040);button10=newButton("显示");button10.setBounds(79025510040); setLocation(400,180);publicvoidactionPerformed(ActionEvente)//TODOAuto-generatedmethodstubfinalJFramecontentPane=newJFrame();label1=newJLabel();label1.setBounds(30,35,100,21);text1=newJTextField();text1.setBounds(65,35,150,21);label2=newJLabel();label2.setBounds(30,65,100,21);text2=newJTextField();text2.setBounds(65,65,150,21);label3=newJLabel();label3.setBounds(309510021);text3=newJTextField();text3.setBounds(95,95,150,21);label8=newJLabel();label8.setBounds(3012510021);text8=newJTextField();text8.setBounds(95,125,150,21);label9=newJLabel();label9.setBounds(3015510021);text9=newJTextField();text9.setBounds(65,155,150,21);labe21=newJLabel();labe21.setBounds(3018510021);text11=newJTextField();text11.setBounds(65,185,150,21);labe22=newJLabel();labe22.setBounds(3021510021);text12=newJTextField();text12.setBounds(65,215,150,21);labe23=newJLabel(); labe23.setBounds(30,245,100,21);text13=newJTextField();text13.setBounds(65,245,150,21);button6=newJButton();contentPane.setLocation(520300);publicvoidactionPerformed(ActionEventarg0)trylinlist1.insert(num, }catch(Exceptione1)}}

}

publicvoidactionPerformed(ActionEventarg0)JOptionPane.showMessageDialog(null请选择要修改的信息");finalJFramecontentPane1=newJFrame();label4=newJLabel();label4.setBounds(30,35,100,21);text4=newtext4.setBounds(65,35,150,21);label5=newJLabel();label5.setBounds(30,65,100,21);text5=newtext5.setBounds(65,65,150,21);label6=newJLabel();label6.setBounds(309510021);text6=newtext6.setBounds(95,95,150,21);labe24=newJLabel();labe24.setBounds(3012510021);text14=newtext14.setBounds(95,125,150,21);labe25=newJLabel();labe25.setBounds(3015510021);text15=newtext15.setBounds(65,155,150,21);labe26=newJLabel();labe26.setBounds(3018510021);text16=newtext16.setBounds(65,185,150,21);labe27=newlabe27.setBounds(3021510021);text17=newtext17.setBounds(65,215,150,21);labe28=newJLabel(); labe28.setBounds(30,245,100,21);text18=newtext18.setBounds(65,245,150,21);button7=newJButton();trystr=new}catch(Exceptione)}try{}catch(Exceptione2)}publicvoidactionPerformed(ActionEvente)trylinlist1.insert(tidai, }catch(Exceptione1)}}}}publicvoidactionPerformed(ActionEvente),"try}catch(Exceptione1)}}}publicvoidactionPerformed(ActionEvente)//TODOAuto-generatedmethodpaixucun[]=newpaixu[num];for(intm=0;m<num;m++){}for(inttry{ }catch(Exceptione1)//TODOAuto-generatedcatchblock}}intn=cun.length;for(inti=1;i<n;i++){for(intj=0;j<n-i;j++){paixut=cun[j];cun[j]=cun[j+1];cun[j+1]=t;}}}for(intk=0;k<num;k++){try{linlist1.insert(k, }catch(Exceptione1)//TODOAuto-generatedcatchblock}}}publicvoidactionPerformed(ActionEvente)}publicvoidactionPerformed(ActionEventarg0)finalJFrameframe=newJFrame("查询");frame.setBounds(520,300,400,150);label7=newJLabel("请输入label7.setBounds(60,35,120,21);text7=newJTextField();text7.setBounds(180,35,120,21);button9.setBounds(170,70,60,25);publicvoidactionPerformed(ActionEventarg0)intpaixucun1[]=newpaixu[num];for(intm=0;m<num;m++){cun1[m]=newpaixu();}for(inttry }catch(Exceptione1)} }},"}

}

}

publicvoidactionPerformed(ActionEventarg0){for(inti=0;i<num;i++){try{}catch(Exceptione)}}}

}publicstaticvoidmain(Stringargs[]){Main1a=newMain1();}}publicinterfacepublicvoidinsert(inti,Stringobj)throwspublicObjectdelete(inti)throwsException;publicStringgetData(inti)throwsException;publicintsize();publicboolean}publicclassLinListimplementsList{Nodehead;Nodeinthead=current=new}publicvoidindex(inti)throwsif(i<-1||i>size-thrownewException("}if(i==-1){current=head;return;}current=head.next;intj=while((current!=null)&&j<i){j}}publicvoidin

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论