2022年Java人事管理与实现.docx
《2022年Java人事管理与实现.docx》由会员分享,可在线阅读,更多相关《2022年Java人事管理与实现.docx(18页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精品学习资源课 程 设 计人事治理系统的设计与实现课程名称 Java 语言课程设计题目名称同学学院专业班级 学号同学姓名指导老师2021 年 6 月 8 日一、 设计内容自学 Swing 图形界面设计和数据库程序设计;开发用于某单位的人事治理系统;该系统要求实现以下功能:员工信息治理(包括:员工信息一览表、新员工的建立、修改、删除)二、 设计方案1、使用 Netbeans IDE 7.1 和 SQL Server2000 进行编译;2、代码如下: 登录按钮代码:private void jTextField1ActionPerformedjava.awt.event.ActionEvent e
2、vt private void jButton1ActionPerformedjava.awt.event.ActionEvent evt String user = jTextField1.getText.trim ;String password = jTextField2.getText.trim ;if user.equalswsm & password.equalswsm new yuangongxinxiguanli.setVisibletrue ;setVisiblefalse ; else JOptionPane.showMessageDialognull, 请正确输入! ;欢
3、迎下载精品学习资源public static void mainString args java.awt.EventQueue.invokeLaternew Runnable public void run new denglu.setVisibletrue ; ;员工信息关系系统界面:package 人事治理系统;public class yuangongxinxiguanli extends javax.swing.JFrame public yuangongxinxiguanli initComponents ;setLocation450,220 ;SuppressWarningsun
4、checked/ private void initComponents jButton1 = new javax.swing.JButton ;jButton2 = new javax.swing.JButton ;jButton3 = new javax.swing.JButton ;jLabel1 = new javax.swing.JLabel ;jButton4 = new javax.swing.JButton ;jButton5 = new javax.swing.JButton ;setDefaultCloseOperationjavax.swing.WindowConstan
5、ts.EXIT_ON_CLOSE;jButton1.setText 查询员工信息 ;jButton1.addActionListenernew java.awt.event.ActionListener public void actionPerformedjava.awt.event.ActionEvent evt jButton1ActionPerformedevt ; ;jButton2.setText 添加员工信息 ;jButton2.addActionListenernew java.awt.event.ActionListener public void actionPerform
6、edjava.awt.event.ActionEvent evt jButton2ActionPerformedevt ; ;jButton3.setText 删除员工信息 ;jButton3.addActionListenernew java.awt.event.ActionListener public void actionPerformedjava.awt.event.ActionEvent evt jButton3ActionPerformedevt ; ;欢迎下载精品学习资源jLabel1.setFontnew java.awt.Font 宋体, 0, 24 ; / NOI18N
7、jLabel1.setText 员工信息治理系统 ;jButton4.setText 修改员工信息 ;jButton4.addActionListenernew java.awt.event.ActionListener public void actionPerformedjava.awt.event.ActionEvent evt jButton4ActionPerformedevt ; ;jButton5.setText 退出系统 ; jButton5.addActionListenernew java.awt.event.ActionListener public void actio
8、nPerformedjava.awt.event.ActionEvent evt jButton5ActionPerformedevt ; ;javax.swing.GroupLayout layout = new javax.swing.GroupLayoutgetContentPane;getContentPane.setLayoutlayout ;layout.setHorizontalGrouplayout.createParallelGroupjavax.swing.GroupLayout.Alignment.LEADING.addGrouplayout.createSequenti
9、alGroup.addGrouplayout.createParallelGroupjavax.swing.GroupLayout.Alignment.LEADING.addGrouplayout.createSequentialGroup.addGap91, 91, 91.addGrouplayout.createParallelGroupjavax.swing.GroupLayout.Alignment.LEADING,false.addComponentjButton1,javax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayou
10、t.DEFAULT_SIZE, Short.MAX_VALUE.addComponentjButton4,javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE.addComponentjButton2,javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE.addComponentjButton3,javax.swing.GroupLayo
11、ut.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE.addComponentjButton5,javax.swing.GroupLayout.DEFAULT_SIZE,javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE.addGrouplayout.createSequentialGroup.addGap47, 47, 47.addComponentjLabel1.addContainerGap52, Short.MAX_V ALUE;layout.
12、setVerticalGrouplayout.createParallelGroupjavax.swing.GroupLayout.Alignment.LEADING.addGrouplayout.createSequentialGroup.addGap14, 14, 14.addComponentjLabel1,javax.swing.GroupLayout.PREFERRED_SIZE,37,欢迎下载精品学习资源javax.swing.GroupLayout.PREFERRED_SIZE.addGap18, 18, 18.addComponentjButton1,javax.swing.G
13、roupLayout.PREFERRED_SIZE,33, javax.swing.GroupLayout.PREFERRED_SIZE.addPreferredGapjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED.addComponentjButton2,javax.swing.GroupLayout.PREFERRED_SIZE,32, javax.swing.GroupLayout.PREFERRED_SIZE.addPreferredGapjavax.swing.LayoutStyle.ComponentPlacement.UN
14、RELATED.addComponentjButton4,javax.swing.GroupLayout.PREFERRED_SIZE,34, javax.swing.GroupLayout.PREFERRED_SIZE.addPreferredGapjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED.addComponentjButton3,javax.swing.GroupLayout.PREFERRED_SIZE,31, javax.swing.GroupLayout.PREFERRED_SIZE.addPreferredGapjav
15、ax.swing.LayoutStyle.ComponentPlacement.UNRELATED.addComponentjButton5,javax.swing.GroupLayout.PREFERRED_SIZE,33, javax.swing.GroupLayout.PREFERRED_SIZE.addContainerGap36, Short.MAX_V ALUE;pack;/ private void jButton1ActionPerformedjava.awt.event.ActionEvent evt chaxun ch=new chaxun;ch.setVisibletru
16、e ;ch.setLocation400,220 ;setVisiblefalse ;private void jButton2ActionPerformedjava.awt.event.ActionEvent evt tianjia ti=new tianjia ;ti.setVisibletrue ;ti.setLocation400,220 ;setVisiblefalse ;/ TODO add your handling code here:private void jButton4ActionPerformedjava.awt.event.ActionEvent evt xiuga
17、i xi=new xiugai ;xi.setVisibletrue ;xi.setLocation400,220 ;setVisiblefalse ;/ TODO add your handling code here:private void jButton3ActionPerformedjava.awt.event.ActionEvent evt shanchu sh=new shanchu;sh.setVisibletrue;sh.setLocation400,220;setVisiblefalse ;欢迎下载精品学习资源private void jButton5ActionPerfo
18、rmedjava.awt.event.ActionEvent evt System.exit0;public static void mainString args java.awt.EventQueue.invokeLaternew Runnable public void run new yuangongxinxiguanli.setVisibletrue ; ;/ Variables declaration - do not modify private javax.swing.JButton jButton1 ;private javax.swing.JButton jButton2
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022 Java 人事管理 实现
限制150内