《数据库应用》课程设计人事管理系统java源代码文档格式.docx

上传人:b****1 文档编号:4312345 上传时间:2023-05-03 格式:DOCX 页数:127 大小:36.59KB
下载 相关 举报
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第1页
第1页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第2页
第2页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第3页
第3页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第4页
第4页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第5页
第5页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第6页
第6页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第7页
第7页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第8页
第8页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第9页
第9页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第10页
第10页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第11页
第11页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第12页
第12页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第13页
第13页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第14页
第14页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第15页
第15页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第16页
第16页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第17页
第17页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第18页
第18页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第19页
第19页 / 共127页
《数据库应用》课程设计人事管理系统java源代码文档格式.docx_第20页
第20页 / 共127页
亲,该文档总共127页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

《数据库应用》课程设计人事管理系统java源代码文档格式.docx

《《数据库应用》课程设计人事管理系统java源代码文档格式.docx》由会员分享,可在线阅读,更多相关《《数据库应用》课程设计人事管理系统java源代码文档格式.docx(127页珍藏版)》请在冰点文库上搜索。

《数据库应用》课程设计人事管理系统java源代码文档格式.docx

con.setLayout(null);

label.setBounds(95,10,110,20);

label.setFont(newFont("

Font.PLAIN,14));

con.add(label);

labelName.setBounds(45,40,55,20);

labelName.setFont(f);

con.add(labelName);

textName.setBounds(95,40,120,20);

con.add(textName);

labelage.setBounds(45,70,45,20);

con.add(labelage);

labelage.setFont(f);

textage.setBounds(95,70,120,20);

con.add(textage);

buttonEnter.setBounds(90,110,60,20);

buttonEnter.setFont(f);

con.add(buttonEnter);

//登陆的鼠标监听

buttonEnter.addMouseListener(newMouseAdapter(){

publicvoidmouseClicked(MouseEventme){

if(textName.getText().equals("

)){

newJOptionPane().showMessageDialog(null,"

用户名不能为空!

}

elseif(textage.getText().equals("

密码不能为空!

else{

Stringsql="

select*fromUserInformationwhereUser_Name='

+textName.getText()+"

'

andPassword='

+textage.getText()+"

;

System.out.println(sql);

Judge(sql);

});

buttoncancel.setBounds(155,110,60,20);

buttoncancel.setFont(f);

con.add(buttoncancel);

//清空按钮的鼠标监听方法

buttoncancel.addMouseListener(newMouseAdapter(){

textName.setText("

textage.setText("

setResizable(false);

Imageimg=Toolkit.getDefaultToolkit().getImage("

image\\main.gif"

setIconImage(img);

Toolkitt=Toolkit.getDefaultToolkit();

intw=t.getScreenSize().width;

inth=t.getScreenSize().height;

setBounds(w/2-150,h/2-90,300,180);

setVisible(true);

privatevoidJudge(StringsqlString){

if(Database.joinDB()){

if(Database.query(sqlString))

try{

if(Database.rs.isBeforeFirst()){

System.out.println("

密码正确"

jf.setVisible(false);

D.close();

newMain();

else{

错误"

用户名或密码错

误!

"

JOptionPane.ERROR_MESSAGE);

}catch(Exceptionex){

System.out.println(ex.getMessage());

连接数据库不成功"

publicstaticvoidmain(Stringargs[]){

newLand();

//主函数类,可以独立运行

publicclassMainextendsJFrameimplementsRunnable{

Threadt=newThread(this);

JDesktopPanedeskpane=newJDesktopPane();

JPanelp=newJPanel();

Labellp1=newLabel("

欢迎使用员工管理系统!

ImageIconicon1=newImageIcon("

imagetjsc.gif"

ImageIconicon2=newImageIcon("

imagecxdl.gif"

ImageIconicon3=newImageIcon("

imagexgmm.gif"

ImageIconicon4=newImageIcon("

imagetcxt.gif"

ImageIconicon5=newImageIcon("

imagejj.gif"

ImageIconicon6=newImageIcon("

imagehelp.gif"

ImageIconicon7=newImageIcon("

imagecx.gif"

ImageIconicon8=newImageIcon("

imagegl.gif"

ImageIconicon9=newImageIcon("

imagext.gif"

ImageIconicon10=newImageIcon("

imagexxgl.gif"

ImageIconicon11=newImageIcon("

imagexxcx.gif"

ImageIconicon12=newImageIcon("

imagebz.gif"

ImageIconicon13=newImageIcon("

imagegy.gif"

ImageIconicon14=newImageIcon("

imageglxx.gif"

ImageIconicon15=newImageIcon("

imagecxxx.gif"

//完

--------------------------------------------------------------------------------

publicMain(){

con.setLayout(newBorderLayout());

con.add(deskpane,BorderLayout.CENTER);

Fontf=newFont("

JMenuBarmb=newJMenuBar();

JMenusystemM=newJMenu("

系统管理"

systemM.setFont(f);

JMenumanageM=newJMenu("

信息管理"

manageM.setFont(f);

JMenuemployeeMM=newJMenu("

员工信息管理"

employeeMM.setFont(f);

JMenuselectM=newJMenu("

信息查询"

selectM.setFont(f);

JMenuemployeeSM=newJMenu("

员工信息查询"

employeeSM.setFont(f);

JMenuhelpM=newJMenu("

帮助"

helpM.setFont(f);

JMenuaboutM=newJMenu("

关于"

aboutM.setFont(f);

JMenuItempassword=newJMenuItem("

密码修改"

password.setFont(f);

JMenuItemland=newJMenuItem("

重新登陆"

land.setFont(f);

JMenuItemaddDelete=newJMenuItem("

添加/删除用户"

addDelete.setFont(f);

JMenuItemexit=newJMenuItem("

退出系统"

exit.setFont(f);

systemM.add(password);

systemM.add(land);

systemM.add(addDelete);

systemM.add(exit);

//为系统管理菜单加事件

password.addActionListener(newActionListener(){

publicvoidactionPerformed(ActionEvente){

AmendPassword"

deskpane.add(newAmendPassword());

land.addActionListener(newActionListener(){

Land"

setVisible(false);

addDelete.addActionListener(newActionListener(){

deskpane.add(newAddDeleteUser());

exit.addActionListener(newActionListener(){

//newJOptionPane().showMessageDialog(

JMenuItemdepartmentM=newJMenuItem("

部门信息管理"

departmentM.setFont(f);

JMenuItememployeeM=newJMenuItem("

基本信息管理"

employeeM.setFont(f);

JMenuItemtrainM=newJMenuItem("

培训信息管理"

trainM.setFont(f);

JMenuItemencouragementPunishM=newJMenuItem("

奖罚信息管理"

encouragementPunishM.setFont(f);

JMenuItemwageM=newJMenuItem("

薪资信息管理"

wageM.setFont(f);

employeeMM.add(trainM);

employeeMM.add(employeeM);

employeeMM.add(encouragementPunishM);

employeeMM.add(wageM);

manageM.add(employeeMM);

manageM.add(departmentM);

//为管理菜单加事件

departmentM.addActionListener(newActionListener(){

Departmentmanage"

deskpane.add(newDepartmentmanage());

employeeM.addActionListener(newActionListener(){

Employeemanage"

deskpane.add(newEmployeemanage());

trainM.addActionListener(newActionListener(){

Trainmanage"

deskpane.add(newTrainmanage());

encouragementPunishM.addActionListener(newActionListener(){

EncouragementPunish"

deskpane.add(newEncouragementPunish());

wageM.addActionListener(newActionListener(){

WageManage"

deskpane.add(newWageManage());

JMenuItemdepartmentS=newJMenuItem("

部门信息查询"

departmentS.setFont(f);

JMenuItememployeeS=newJMenuItem("

基本信息查询"

employeeS.setFont(f);

JMenuItemtrainS=newJMenuItem("

培训信息查询"

trainS.setFont(f);

JMenuItemencouragementPunishS=newJMenuItem("

奖罚信息查询"

encouragementPunishS.setFont(f);

JMenuItemwageS=newJMenuItem("

薪资信息查询"

wageS.setFont(f);

employeeSM.add(trainS);

employeeSM.add(employeeS);

employeeSM.add(encouragementPunishS);

employeeSM.add(wageS);

selectM.add(employeeSM);

selectM.add(departmentS);

//为查询菜单加事件

departmentS.addActionListener(newActionListener(){

DIQ"

deskpane.add(newDIQ());

employeeS.addActionListener(newActionListener(){

BIQ"

deskpane.add(newBIQ());

trainS.addActionListener(newActionListener(){

TIQ"

deskpane.add(newTIQ());

encouragementPunishS.addActionListener(newActionListener(){

EPIQ"

deskpane.add(newEPIQ());

wageS.addActionListener(newActionListener(){

SIQ"

deskpane.add(newSIQ());

JMenuItemhelp=newJMenuItem("

help.setFont(f);

JMenuItemabout=newJMenuItem("

about.setFont(f);

helpM.add(help);

aboutM.add(about);

//为帮助菜单加事件

about.addActionListener(newActionListener(){

deskpane.add(newAbout());

mb.add(systemM);

mb.add(manageM);

mb.add(selectM);

mb.add(helpM);

mb.add(aboutM);

setJMenuBar(mb);

imagemain.gif"

systemM.setIcon(icon9);

manageM.setIcon(icon8);

selectM.setIcon(icon7);

helpM.setIcon(icon6);

addDelete.setIcon(icon1);

land.setIcon(icon2);

password.setIcon(icon3);

exit.setIcon(icon4);

employeeMM.setIcon(icon5);

employeeSM.setIcon(icon5);

departmentM.setIcon(icon10);

departmentS.setIcon(icon11);

help.setIcon(icon6);

aboutM.setIcon(icon13);

about.setIcon(icon13);

employeeM.setIcon(icon14);

trainM.setIcon(icon14);

encouragementPunishM.setIcon(icon14);

wageM.setIcon(icon14);

employeeS.setIcon(icon15);

trainS.setIcon(icon15);

encouragementPunishS.setIcon(icon15);

wageS.setIcon(icon15);

JToolBarjToolBar1=newJToolBar();

jToolBar1.setLayout(newGridLayout(9,1));

JButtonjButton1=newJButton();

jButton1.setToolTipText("

员工基本信息管理"

JButtonjButton2=newJButton();

jButton2.setToolTipText("

员工基本信息查询"

JButtonjButton3=newJButton();

jButton3.setToolTipText("

修改密码"

JButtonjButton5=newJButton();

jButton5.setToolTipText("

计算器"

JButtonjButton6

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2