基于java+swing+mysql+JFeeChart的企业人力资源管理系统(1)

文章目录

    • 一,前言
    • 二,项目运行图
      • (1)主界面(管理员界面)
      • (2)员工资料运行图
      • (3)全部员工查看运行图
      • (4)部门管理运行图
      • (5)岗位管理运行图
      • (6)工资发放系统运行图
      • (7)薪酬记录运行图
      • (8)考勤管理运行图
      • (9)部门建立运行图
      • (10)岗位简建立运行图
      • (11)员工入职手续办理运行图
      • (12)考试系统运行图
      • (13)建立试题
      • (14)题库运行图
      • (15)生成试卷运行图
      • (16)招聘计划运行图
      • (17)招聘计划查看运行图
      • (18)招聘计划数据分析
      • (19)学生简历查看运行图
      • (20)主界面(员工端)
      • (21)填写简历运行图
      • (22)员工入职考试运行图
      • (23)管理员登陆运行图
      • (24)管理员注册运行图
    • 三,数据库设计
      • (1)员工表
      • (2)用户信息表
      • (3) 薪酬表
      • (4) 试卷表
      • (5) 部门历史记录表
      • (6) 岗位表
      • (7) 员工简历表
      • (8) 员工考试分数记录表
      • (9)考试信息视图
      • (10)薪酬记录视图
      • (11)员工基本信息视图(用于工资发放参考)
      • (12)部门表
      • (13)招聘计划表
      • (14)试卷生成记录表
    • 四,项目实现代码
      • (1)包结构
      • (2)类结构
      • (3)gradeAnaChartD
      • (4)PlanChartD
      • (5)Dao(数据库操作)
      • (6)AddDutyDialog
      • (7)AllEmployee
      • (8) AllPlanD
      • (9)AppGradeD
      • (10)AttendanceAddD
      • (11)AttendanceManage
      • (12) BirthPaper
      • (13)DepartmentProprtionF
      • (14)DivianageF
      • (15) DutyDesignD
      • (16)DutyManagementF
      • (17)EmployeeInfoClientF
      • (18)EmployeeInfoF
      • (19)EmployeeInfoF2
      • (20) EmployeeInfoFShow
      • (21)EmployeeLoginF
      • (22)EmployInfoD
      • (23)EstablishDepartmentF
      • (24)
      • (25)MainWindowServerF
      • (26)OutPaperD
      • (27)PaperBankD
      • (28)RegisterF
      • (29)RemunerationManageF
      • (30)SalaryCount
      • (31)testPaper
      • (32)TestSystemD
      • (33)WindowMainClientF
      • (34)AllActionListener
      • (35) AllMouseListener
      • (36)RegisterAction
      • (37) clearAttendance
      • (38)ClearDuty
      • (39)ClearTextOfDepart
      • (40)Md5Password
      • (41)StringUtils
      • (42)TextClue

一,前言

随着计算机在各行各业的广泛应用,企事业单位人力资源管理也逐渐和计算机信息化管理技术相结合。传统的人力资源管理存在许多不足之处:如人工化作业较多,当数据量过大时,容易造成工作错误;人力资源管理仅仅停留在比较简单的人员档案管理阶段,没有能够体现人力资源管理中的工资管理、绩效考核管理、考勤管理等功能等。这些问题导致了企业事业单位人事工作发展需要跟实际人力资源管理发展不协调的情况出现。基于此,本文设计研发了一套基于swing技术的人力资源管理系统,旨在将企事业单位人力资源管理的各方面功能均得以实现。本文所设计的系统主要功能分为员工基本档案管理、员工日常考勤管理、员工奖惩绩效管理、系统用户管理和系统参数设置管理几个模块。系统采用C/S结构作为主要的体系结构,实现了人力资源管理工作高效化、实时化。在设计过程中采用权限管理技术,对系统用户分组,分配角色并对不同角色进行设置权限,最大可能地保证了系统的安全性。系统在数据访问方面,为了避免系统使用高峰期可能带来的数据处理缓慢、响应不及时的情况,系统采用了数据库连接池技术,有效地解决了系统使用高峰期给用户带来的不便。通过系统测试,本系统满足了本单位人力资源管理工作的基本需求,实现了设计的目标。

二,项目运行图

(1)主界面(管理员界面)

在这里插入图片描述

(2)员工资料运行图

在这里插入图片描述

(3)全部员工查看运行图

在这里插入图片描述

(4)部门管理运行图

在这里插入图片描述

(5)岗位管理运行图

在这里插入图片描述

(6)工资发放系统运行图

在这里插入图片描述

(7)薪酬记录运行图

在这里插入图片描述

(8)考勤管理运行图

在这里插入图片描述

(9)部门建立运行图

在这里插入图片描述

(10)岗位简建立运行图

在这里插入图片描述

(11)员工入职手续办理运行图

在这里插入图片描述

(12)考试系统运行图

在这里插入图片描述

(13)建立试题

在这里插入图片描述

(14)题库运行图

在这里插入图片描述

(15)生成试卷运行图

在这里插入图片描述

(16)招聘计划运行图

在这里插入图片描述

(17)招聘计划查看运行图

在这里插入图片描述

(18)招聘计划数据分析

在这里插入图片描述

(19)学生简历查看运行图

在这里插入图片描述

(20)主界面(员工端)

在这里插入图片描述

(21)填写简历运行图

在这里插入图片描述

(22)员工入职考试运行图

在这里插入图片描述
2.
在这里插入图片描述

(23)管理员登陆运行图

在这里插入图片描述

(24)管理员注册运行图

在这里插入图片描述

三,数据库设计

在这里插入图片描述

(1)员工表

在这里插入图片描述

(2)用户信息表

在这里插入图片描述

(3) 薪酬表

在这里插入图片描述

(4) 试卷表

在这里插入图片描述

(5) 部门历史记录表

在这里插入图片描述

(6) 岗位表

在这里插入图片描述

(7) 员工简历表

在这里插入图片描述

(8) 员工考试分数记录表

在这里插入图片描述

(9)考试信息视图

在这里插入图片描述

(10)薪酬记录视图

在这里插入图片描述

(11)员工基本信息视图(用于工资发放参考)

在这里插入图片描述

(12)部门表

在这里插入图片描述

(13)招聘计划表

在这里插入图片描述

(14)试卷生成记录表

在这里插入图片描述

四,项目实现代码

(1)包结构

在这里插入图片描述

(2)类结构

在这里插入图片描述

在这里插入图片描述

(3)gradeAnaChartD

package com.employee.chart;
/*** 考生成绩数据分析*/
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;import com.employee.dao.Dao;public class gradeAnaChartD extends JDialog {public gradeAnaChartD() {String sql="select * from grade";DefaultCategoryDataset data=new DefaultCategoryDataset();try {ResultSet rs=Dao.allData(sql);while(rs.next()) {data.setValue(rs.getInt("score"),  rs.getString("name"), rs.getString("name"));}} catch (SQLException e1) {e1.printStackTrace();}JFreeChart freeChart=ChartFactory.createBarChart("考生成绩","姓名", "总分",data,PlotOrientation.VERTICAL,true,true,true);ChartPanel chartPanel=new ChartPanel(freeChart);chartPanel.setSize(1200, 650);chartPanel.setPreferredSize(new Dimension(1200, 700));try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setResizable(false);setSize(1200, 700);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(new BorderLayout());JPanel panel = new JPanel();panel.setLayout(null);panel.add(chartPanel);getContentPane().add(panel, BorderLayout.CENTER);}}

(4)PlanChartD

package com.employee.chart;import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultPieDataset;import com.employee.dao.Dao;import javax.swing.JMenuBar;
import javax.swing.JMenu;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.border.TitledBorder;public class PlanChartD extends JDialog {public PlanChartD() {setResizable(false);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u4EBA\u6570", TitledBorder.LEADING, TitledBorder.TOP, null, Color.PINK));panel_2.setBounds(938, 366, 300, 342);getContentPane().add(panel_2);/*** 柱状图*/String sql="select * from recruitPlan";DefaultCategoryDataset dataset=new DefaultCategoryDataset();//柱状图DefaultPieDataset data=new DefaultPieDataset();//饼图try {ResultSet rs=Dao.allData(sql);while(rs.next()) {dataset.setValue(rs.getInt("num"), rs.getString("partName"), rs.getString("dutyName"));data.setValue(rs.getString("partName"), rs.getInt("num"));JLabel part=new JLabel(rs.getString("partName"));JLabel num=new JLabel(rs.getString("num"));panel_2.add(part);panel_2.add(num);}} catch (SQLException e1) {e1.printStackTrace();}JFreeChart freeChart=ChartFactory.createBarChart("各部门招聘岗位人数比例","部门", "人数", dataset,PlotOrientation.VERTICAL,true,true,true);JFreeChart freeChart1=ChartFactory.createPieChart3D("各部门招聘岗位人数比例",data,true,true,true);ChartPanel chartPanel=new ChartPanel(freeChart);chartPanel.setPreferredSize(new Dimension(800,700));ChartPanel chartPanel1=new ChartPanel(freeChart1);chartPanel1.setPreferredSize(new Dimension(300,300));try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 1250, 750);setLocationRelativeTo(null);setModal(true);getContentPane().setLayout(null);JPanel panel = new JPanel();panel.add(chartPanel);panel.setBounds(12, 0, 800, 708);getContentPane().add(panel);JPanel panel_1 = new JPanel();panel_1.setBounds(938, 0, 300, 324);getContentPane().add(panel_1);panel_1.add(chartPanel1);} catch (Exception e) {e.printStackTrace();}}
}

(5)Dao(数据库操作)

package com.employee.dao;import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;import com.employee.kit.Md5Password;
import com.employee.model.DaoData;
import com.employee.model.Department;
import com.employee.model.Duty;
import com.employee.model.Employee;
import com.employee.model.Grade;
import com.employee.model.Money;
import com.employee.model.Paper;
import com.employee.model.RecruitPlan;
import com.employee.model.SetPaper;
import com.employee.model.User;public class Dao {private static Connection conn=null;/*** 加载驱动* 获得连接* @return*/public static Connection conn() {DaoData dao=new DaoData();try {Class.forName(dao.getDRAVER());conn=DriverManager.getConnection(dao.getUrl(),dao.getName(),dao.getPassword());} catch (Exception e) {e.printStackTrace();} return conn;}/*** * 关闭数据库*/public static void close() {try {conn.close();} catch (SQLException e) {e.printStackTrace();}}/*** * 登陆检查* @param user* @return* @throws SQLException*/public static User checkLogin(User user) throws SQLException {User u=null;String sql =  "select *  from User where account=? ";PreparedStatement pstmt=Dao.preparedStatement(sql);pstmt.setInt(1, user.getAccount());ResultSet rs=pstmt.executeQuery();if(rs.next()){u=new User();u.setAccount(rs.getInt(1));u.setPassword(rs.getString(2));}return u;}/*** 判断是否有此账户* @param u* @return* @throws SQLException*/public static boolean accountExist(User u) throws SQLException {String sql="select *  from User  where account=? ";PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, u.getAccount());ResultSet rs=ps.executeQuery();if(rs.next()) {return true;}else {return false;}}/*** 用户或者管理员注册* @param u* @param sql* @return* @throws Exception*/public static int register(User u,String sql) throws Exception {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, u.getAccount());ps.setString(2, Md5Password.md5Value(u.getPassword()));ps.setDouble(3, u.getPhone());return ps.executeUpdate();}/*** * @param sql* @return* @throws SQLException*/public static PreparedStatement preparedStatement(String sql) throws SQLException {PreparedStatement pre=null;pre = Dao.conn().prepareStatement(sql);return pre;}/*** 查找部门* @throws SQLException * */public static ResultSet searchDepartment(Department dep,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, dep.getNameMark());ResultSet rs=ps.executeQuery();return  rs;}/*** 判断是否已经有此部门* @param dep* @param sql* @return* @throws SQLException*/public static boolean isExist(Department dep,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, dep.getNameMark());ResultSet rs=ps.executeQuery();if(rs.next()) {return true;}else {return false;}}/*** 建立或者修改部门* @throws SQLException * */public static  int estabOrModifyDepartment(Department dep,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, dep.getName());ps.setString(2, dep.getEstablishPerson());ps.setInt(3, dep.getNameMark());return ps.executeUpdate();}/*** 撤销部门* @throws SQLException * */public static int deleteDepartment(Department dep) throws SQLException {String sql="delete from department where nameMark=?";PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, dep.getNameMark());return ps.executeUpdate();}/*** 删除所有的历史纪录* @param sql* @return* @throws SQLException*/public static int clearHistory(String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);return ps.executeUpdate();}/*** 返回所有的数据集(适用于所有不同的表)* @throws SQLException */public static ResultSet allData(String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ResultSet rs=ps.executeQuery();return rs;}/*** 建立岗位* @param du* @param sql* @return* @throws SQLException*/public static  int addOrModifyDuty(Duty du,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, du.getDutyNum());ps.setString(2, du.getDutyName());ps.setString(3, du.getDepartment());return ps.executeUpdate();}/*** 修改岗位* @param du* @param sql* @return* @throws SQLException*/public static  int modifyDuty(Duty du,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, du.getDutyName());ps.setString(2, du.getDepartment());ps.setInt(3, du.getDutyNum());return ps.executeUpdate();}/*** 撤销岗位* @param duty* @return* @throws SQLException*/public static int deleteDuty(Duty duty,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, duty.getDutyNum());return ps.executeUpdate();}/*** 判断是否有岗位存在* @param dep* @param sql* @return* @throws SQLException*/public static boolean isExist(Duty duty,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, duty.getDutyNum());ResultSet rs=ps.executeQuery();if(rs.next()) {return true;}else {return false;}}/*** 搜索岗位* @param dep* @param sql* @return* @throws SQLException*/public static ResultSet searchDuty(Duty duty,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, duty.getDutyNum());ResultSet rs=ps.executeQuery();return  rs;}/*** 添加或者修改招聘计划* @param du* @param sql* @return* @throws SQLException*/public static  int addOrModifyRecruitPlan(RecruitPlan rp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, rp.getDutyName());ps.setString(2, rp.getPartName());ps.setString(3, rp.getDliploma());ps.setInt(4, rp.getNum());ps.setString(5, rp.getProcess());return ps.executeUpdate();}/*** 添加试题或者修改试题* @param paper* @param sql* @return* @throws SQLException*/public static  int addOrModifyPaper(Paper paper,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, paper.getTopic());ps.setString(2, paper.getA());ps.setString(3, paper.getB());ps.setString(4, paper.getC());ps.setString(5,paper.getD());ps.setString(6, paper.getAnswer());return ps.executeUpdate();}/*** 搜索试题* @param paper* @param sql* @return* @throws SQLException*/public static ResultSet searchPaper(Paper paper ,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, paper.getId());return  ps.executeQuery();}/*** 删除试题*/public static int delPaper(Paper paper ) throws SQLException {String sql="delete from paper where topic=?";PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, paper.getTopic());return ps.executeUpdate();}/*** 添加或者修改员工信息(已经被录用)*/public static  int addOrModifyEmFile(Employee emp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setDouble(1, emp.getJobNum());ps.setString(2, emp.getName());ps.setString(3, emp.getSex());ps.setInt(4, emp.getAge());ps.setString(5, emp.getBirthDay());ps.setString(6, emp.getAddress());ps.setString(7, emp.getRace());ps.setString(8, emp.getMarriage());ps.setString(9, emp.getPoliticState());ps.setDouble(10, emp.getPhoneNum());ps.setDouble(11, emp.getId_card());ps.setString(12, emp.getCollage());ps.setString(13, emp.getMajor());ps.setString(14, emp.getCultureStandard());ps.setString(15, emp.getJobTime());ps.setDouble(16, emp.getCreditNum());ps.setString(17, emp.getProfesion());ps.setString(18, emp.getStatus());ps.setString(19, emp.getSignTime());ps.setString(20, emp.getRegistrant());ps.setString(21, emp.getImagePath());ps.setString(22, emp.getCurriculum());ps.setString(23, emp.getDepartment());return ps.executeUpdate();}/*** 添加或者修改员工信息(申请)*/public static  int addOrModApliFile(Employee emp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setString(1, emp.getProfesion());ps.setString(2, emp.getName());ps.setString(3, emp.getSex());ps.setInt(4, emp.getAge());ps.setString(5, emp.getBirthDay());ps.setString(6, emp.getAddress());ps.setString(7, emp.getRace());ps.setString(8, emp.getMarriage());ps.setString(9, emp.getPoliticState());ps.setDouble(10, emp.getPhoneNum());ps.setDouble(11, emp.getId_card());ps.setString(12, emp.getCollage());ps.setString(13, emp.getMajor());ps.setString(14, emp.getCultureStandard());ps.setString(15, emp.getJobTime());ps.setDouble(16, emp.getCreditNum());ps.setString(17, emp.getImagePath());ps.setString(18, emp.getCurriculum());return ps.executeUpdate();}/*** 搜索员工* @param emp* @param sql* @return* @throws SQLException*/public static ResultSet searchEmployeeFile(Employee emp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setDouble(1, emp.getJobNum());ResultSet rs=ps.executeQuery();return  rs;}/*** 删除员工*/public static int delPaper(Employee emp ) throws SQLException {String sql="delete from employeeFile where jobNum=?";PreparedStatement ps=Dao.preparedStatement(sql);ps.setDouble(1,emp.getJobNum()  );return ps.executeUpdate();}/*** 判断员工是否存在*/public static boolean isExistEmployee(Employee emp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setDouble(1,emp.getJobNum());ResultSet rs=ps.executeQuery();if(rs.next()) {return true;}else {return false;}}/*** 搜索员工* @param emp* @param sql* @return* @throws SQLException*/public static ResultSet searchAppli(Employee emp,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1,  emp.getId());ResultSet rs=ps.executeQuery();return  rs;}/*** 删除试题* @param paper* @return* @throws SQLException*/public static int deletePaper(Paper paper ) throws SQLException {String sql="delete from paper where id=?";PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1,paper.getId());return ps.executeUpdate();}/*** 保存试卷配置*/public static  int aOrMPaSet(SetPaper set,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, set.getPaperNum());ps.setInt(2, set.getPaperTime());return ps.executeUpdate();}/*** 查询试题配置* @param set* @param sql* @return* @throws SQLException*/public static ResultSet searchSet(SetPaper set,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, set.getId());ResultSet rs=ps.executeQuery();return  rs;}/*** 保存成绩* @param set* @param sql* @return* @throws SQLException*/public static  int saveScore(Grade g,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setInt(1, g.getScore());ps.setString(2, g.getName());return ps.executeUpdate();}/*** 保存员工工资信息* @param m* @param sql* @return* @throws SQLException*/public static  int addOrModifyMoney(Money m,String sql) throws SQLException {PreparedStatement ps=Dao.preparedStatement(sql);ps.setDouble(1, m.getJobNum());ps.setString(2, m.getName());ps.setFloat(3, m.getSalary());ps.setFloat(4, m.getGradeMoney());ps.setFloat(5, m.getEffectMoney());ps.setFloat(6, m.getCheckAdd());ps.setFloat(7, m.getCheckDec());ps.setFloat(8, m.getCultureMoney());return ps.executeUpdate();}}

(6)AddDutyDialog

package com.employee.frame;import javax.swing.JButton;
import javax.swing.JDialog;
import com.employee.implement.AllActionListener;
import com.employee.kit.ClearDuty;
import com.employee.operate.FillComboBox;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;public class AddDutyDialog extends JDialog {public static JTextField numField;public static  JTextField dutyField;public static JComboBox comboBox;public static JButton button;public AddDutyDialog() {setTitle("建立岗位");try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(322, 390);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setResizable(false);getContentPane().setLayout(null);{JLabel label = new JLabel("岗位代号");label.setBounds(31, 97, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("岗位名");label.setBounds(31, 145, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("所属部门");label.setBounds(31, 186, 59, 18);getContentPane().add(label);}{numField = new JTextField();numField.setBounds(88, 95, 165, 22);getContentPane().add(numField);numField.setColumns(10);}{dutyField = new JTextField();dutyField.setBounds(88, 143, 165, 22);getContentPane().add(dutyField);dutyField.setColumns(10);}comboBox = new JComboBox();FillComboBox.fillPartBox(AddDutyDialog.comboBox);//填充下拉框comboBox.setBounds(88, 186, 165, 23);getContentPane().add(comboBox);button = new JButton("确定");button.setIcon(new ImageIcon(AddDutyDialog.class.getResource("/icons/ok.png")));button.addActionListener(new AllActionListener());button.setBounds(32, 260, 82, 28);getContentPane().add(button);JButton button_1 = new JButton("重置");button_1.setIcon(new ImageIcon(AddDutyDialog.class.getResource("/icons/重置.png")));button_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {ClearDuty.clearText();}});button_1.setBounds(171, 260, 82, 28);getContentPane().add(button_1);JLabel label = new JLabel("建立岗位");label.setFont(new Font("Dialog", Font.BOLD, 20));label.setBounds(110, 22, 103, 51);getContentPane().add(label);JLabel label_1 = new JLabel(" ");label_1.setIcon(new ImageIcon(AddDutyDialog.class.getResource("/images/a6.jpg")));label_1.setBounds(0, -29, 322, 389);getContentPane().add(label_1);}
}

(7)AllEmployee

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import com.employee.dao.Dao;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Color;
import javax.swing.UIManager;public class AllEmployee extends JDialog {private static JTable table;public AllEmployee() {getContentPane().setBackground(Color.YELLOW);getContentPane().setForeground(Color.WHITE);try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1200, 700);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(new BorderLayout());{JPanel panel = new JPanel();panel.setBackground(new Color(152, 251, 152));panel.setForeground(Color.BLACK);FlowLayout flowLayout = (FlowLayout) panel.getLayout();flowLayout.setVgap(50);flowLayout.setHgap(50);getContentPane().add(panel, BorderLayout.NORTH);{JLabel label = new JLabel("全    部   员   工");label.setForeground(Color.RED);label.setBackground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 40));panel.add(label);}}{JScrollPane scrollPane = new JScrollPane();getContentPane().add(scrollPane, BorderLayout.CENTER);{table = new JTable();table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u5DE5\u53F7", "\u59D3\u540D", "\u6027\u522B", "\u5E74\u9F84", "\u90E8\u95E8", "\u5C97\u4F4D", "\u72B6\u6001"}) {boolean[] columnEditables = new boolean[] {true, false, false, false, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});String sql="select * from employeeFile ";try {displayTable(Dao.allData(sql));//填充表格} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);}}}public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel)  AllEmployee.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt("jobNum"));v.add(rs.getString("name"));v.add(rs.getString("sex"));v.add(rs.getInt("age"));v.add(rs.getString("department"));v.add(rs.getString("profesion"));v.add(rs.getString("status"));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}}

(8) AllPlanD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import com.employee.dao.Dao;
import javax.swing.JLabel;
import javax.swing.ImageIcon;public class AllPlanD extends JDialog {public static  JTable table;public AllPlanD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 1069, 555);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);{JPanel panel = new JPanel();panel.setBounds(0, 0, 1069, 128);getContentPane().add(panel);panel.setLayout(null);{JButton button = new JButton("修改");button.setBounds(451, 50, 58, 28);panel.add(button);}{JButton button = new JButton("撤销");button.setBounds(559, 50, 58, 28);panel.add(button);}{JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(AllPlanD.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label.setBounds(0, -29, 1069, 145);panel.add(label);}}{JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(0, 128, 1069, 397);getContentPane().add(scrollPane);{table = new JTable();table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u90E8\u95E8", "\u62DB\u8058\u5C97\u4F4D", "\u6587\u51ED\u8981\u6C42", "\u62DB\u8058\u4EBA\u6570"}) {boolean[] columnEditables = new boolean[] {true, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});String sql="select * from recruitPlan";try {AllPlanD .displayTable(Dao.allData(sql));} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);}}}/*** 设置表格数据* @param rs*/public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel)AllPlanD.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getString(1));v.add(rs.getString(2));v.add(rs.getString(3));v.add(rs.getInt(4));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}}

(9)AppGradeD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import com.employee.chart.gradeAnaChartD;
import com.employee.dao.Dao;
import javax.swing.border.LineBorder;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.ImageIcon;public class AppGradeD extends JDialog {private static  JTable table;public AppGradeD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setResizable(false);setSize(820, 645);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);{JPanel panel = new JPanel();panel.setBounds(0, 0, 820, 130);panel.setBorder(new LineBorder(Color.GREEN));getContentPane().add(panel);{JButton analyzeBtn = new JButton("数据分析");analyzeBtn.setBounds(369, 51, 82, 28);analyzeBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new gradeAnaChartD().setVisible(true);}});panel.setLayout(null);panel.add(analyzeBtn);}{JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(AppGradeD.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label.setBounds(0, 0, 820, 118);panel.add(label);}}{JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(12, 130, 796, 443);getContentPane().add(scrollPane);{table = new JTable();table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u59D3\u540D", "\u6027\u522B", "\u5E74\u9F84", "\u5206\u6570"}) {boolean[] columnEditables = new boolean[] {false, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});try {displayTable(Dao.allData("select * from grade"));//填充表格} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);}}{JPanel panel = new JPanel();panel.setBounds(0, 573, 820, 42);panel.setBorder(new LineBorder(Color.GREEN));FlowLayout flowLayout = (FlowLayout) panel.getLayout();flowLayout.setVgap(20);flowLayout.setHgap(20);getContentPane().add(panel);}{JPanel panel = new JPanel();panel.setBounds(0, 130, 12, 443);panel.setBorder(new LineBorder(Color.GREEN));getContentPane().add(panel);}{JPanel panel = new JPanel();panel.setBounds(808, 130, 12, 443);panel.setBorder(new LineBorder(Color.GREEN));getContentPane().add(panel);}}/*** 填充表格* @param rs*/public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) AppGradeD.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getString("name"));v.add(rs.getString("sex"));v.add(rs.getInt("age"));v.add(rs.getInt("score"));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}}

(10)AttendanceAddD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import com.employee.kit.clearAttendance;import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;public class AttendanceAddD extends JDialog {public static JTextField jobNumField;public static JTextField nameField;public static JTextField typeField;public static JTextField dateField;public AttendanceAddD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 409, 384);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JLabel label = new JLabel("工号");label.setBounds(80, 80, 44, 18);getContentPane().add(label);JLabel label_1 = new JLabel("姓名");label_1.setBounds(80, 123, 44, 18);getContentPane().add(label_1);JLabel label_2 = new JLabel("类型");label_2.setBounds(80, 167, 44, 18);getContentPane().add(label_2);JLabel label_3 = new JLabel("日期");label_3.setBounds(80, 216, 44, 18);getContentPane().add(label_3);jobNumField = new JTextField();jobNumField.setBounds(124, 78, 176, 22);getContentPane().add(jobNumField);jobNumField.setColumns(10);nameField = new JTextField();nameField.setBounds(124, 121, 176, 22);getContentPane().add(nameField);nameField.setColumns(10);typeField = new JTextField();typeField.setBounds(124, 165, 176, 22);getContentPane().add(typeField);typeField.setColumns(10);dateField = new JTextField();dateField.setBounds(124, 214, 176, 22);getContentPane().add(dateField);dateField.setColumns(10);JButton btnNewButton = new JButton("确定");btnNewButton.setIcon(new ImageIcon(AttendanceAddD.class.getResource("/icons/ok.png")));btnNewButton.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {}});btnNewButton.setBounds(80, 283, 86, 28);getContentPane().add(btnNewButton);JButton btnNewButton_1 = new JButton("清空");btnNewButton_1.setIcon(new ImageIcon(AttendanceAddD.class.getResource("/icons/重置.png")));btnNewButton_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {clearAttendance.clearAdd();}});btnNewButton_1.setBounds(214, 283, 86, 28);getContentPane().add(btnNewButton_1);JLabel label_4 = new JLabel(" ");label_4.setIcon(new ImageIcon(AttendanceAddD.class.getResource("/images/a8.jpg")));label_4.setBounds(0, -30, 409, 384);getContentPane().add(label_4);}
}

(11)AttendanceManage

/*** 考勤管理窗体* */package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import com.employee.dao.Dao;
import com.employee.implement.AllMouseListener;
import com.employee.kit.clearAttendance;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Color;public class AttendanceManage extends JDialog {public static JTable table;public  static JTextField textField;public static JTextField jobNumField;public static JTextField nameField;public static JTextField typeField;public static JTextField dateField;public AttendanceManage() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1132, 649);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setTitle("考勤管理");setResizable(false);getContentPane().setLayout(null);{JPanel buttonPane = new JPanel();buttonPane.setBounds(0, 562, 1031, 10);buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));getContentPane().add(buttonPane);}JPanel panel = new JPanel();panel.setBorder(new TitledBorder(null, "\u4FE1\u606F", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel.setBounds(277, 119, 662, 384);getContentPane().add(panel);panel.setLayout(new BorderLayout(0, 0));JScrollPane scrollPane = new JScrollPane();panel.add(scrollPane, BorderLayout.CENTER);table = new JTable();table.addMouseListener( new AllMouseListener());table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u5DE5\u53F7", "\u59D3\u540D", "\u7C7B\u578B", "\u65E5\u671F"}) {boolean[] columnEditables = new boolean[] {true, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});String sql="select * from check_in";try {displayTable(Dao.allData(sql));} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);textField = new JTextField();textField.setBounds(337, 85, 222, 22);getContentPane().add(textField);textField.setColumns(10);JLabel lblNewLabel = new JLabel("工号");lblNewLabel.setForeground(Color.RED);lblNewLabel.setBounds(298, 87, 59, 18);getContentPane().add(lblNewLabel);JButton searchBtn = new JButton("查找");searchBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/查找.png")));searchBtn.setBounds(566, 83, 94, 22);getContentPane().add(searchBtn);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u8868\u5355\u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(0, 117, 247, 384);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label = new JLabel("工号");label.setForeground(Color.BLUE);label.setBounds(12, 36, 59, 18);panel_1.add(label);jobNumField = new JTextField();jobNumField.setEditable(false);jobNumField.setBounds(45, 34, 158, 22);panel_1.add(jobNumField);jobNumField.setColumns(10);JLabel label_1 = new JLabel("姓名");label_1.setForeground(Color.BLUE);label_1.setBounds(12, 88, 59, 18);panel_1.add(label_1);nameField = new JTextField();nameField.setBounds(45, 86, 158, 22);panel_1.add(nameField);nameField.setColumns(10);JLabel label_2 = new JLabel("类型");label_2.setForeground(Color.BLUE);label_2.setBounds(12, 145, 59, 18);panel_1.add(label_2);typeField = new JTextField();typeField.setBounds(45, 143, 158, 22);panel_1.add(typeField);typeField.setColumns(10);JButton modifyBtn = new JButton("修改");modifyBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/修改.png")));modifyBtn.setBounds(12, 242, 78, 28);panel_1.add(modifyBtn);JLabel label_3 = new JLabel("日期");label_3.setForeground(Color.BLUE);label_3.setBounds(12, 196, 46, 18);panel_1.add(label_3);dateField = new JTextField();dateField.setBounds(45, 194, 158, 22);panel_1.add(dateField);dateField.setColumns(10);JButton addBtn = new JButton("添加");addBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/增加.png")));addBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new AttendanceAddD().setVisible(true);}});addBtn.setBounds(115, 242, 88, 28);panel_1.add(addBtn);JButton clearBtn = new JButton("清空");clearBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/重置.png")));clearBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {clearAttendance.clearText();}});clearBtn.setBounds(115, 296, 88, 28);panel_1.add(clearBtn);JButton deleteBtn = new JButton("删除");deleteBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/删除.png")));deleteBtn.setBounds(12, 296, 78, 28);panel_1.add(deleteBtn);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u8868\u5355\u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_2.setBounds(972, 117, 148, 384);getContentPane().add(panel_2);panel_2.setLayout(null);JButton stateBtn = new JButton("数据报表");stateBtn.setIcon(new ImageIcon(AttendanceManage.class.getResource("/icons/分析.png")));stateBtn.setBounds(31, 42, 105, 28);panel_2.add(stateBtn);}public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) AttendanceManage.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt("jobNum"));v.add(rs.getString("name"));v.add(rs.getString("type"));v.add(rs.getString("date"));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}}

(12) BirthPaper

package com.employee.frame;import javax.swing.JButton;
import javax.swing.JDialog;
import com.employee.implement.AllActionListener;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.ImageIcon;public class BirthPaper extends JDialog {public  static JTextField idField;public static JTextField timeField;public static JButton birthBtn;public static JButton cancelBtn; private JLabel label_1;public BirthPaper() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setResizable(false);setSize( 319, 300);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);{JLabel label = new JLabel("考试题目总数:");label.setBounds(44, 95, 92, 18);getContentPane().add(label);}idField = new JTextField();idField.setBounds(138, 93, 114, 22);getContentPane().add(idField);idField.setColumns(10);JLabel lblh = new JLabel("考试时间(分钟):");lblh.setBounds(44, 148, 105, 18);getContentPane().add(lblh);timeField = new JTextField();timeField.setBounds(138, 146, 114, 22);getContentPane().add(timeField);timeField.setColumns(10);JLabel label = new JLabel("试卷生成");label.setFont(new Font("Dialog", Font.BOLD, 23));label.setBounds(99, 12, 114, 47);getContentPane().add(label);cancelBtn = new JButton("取消");cancelBtn.setIcon(new ImageIcon(BirthPaper.class.getResource("/icons/cancel.png")));cancelBtn.setBounds(44, 211, 79, 28);getContentPane().add(cancelBtn);birthBtn = new JButton("生成");birthBtn.setIcon(new ImageIcon(BirthPaper.class.getResource("/icons/ok.png")));birthBtn.addActionListener(new AllActionListener() );birthBtn.setBounds(172, 211, 79, 28);getContentPane().add(birthBtn);label_1 = new JLabel(" ");label_1.setIcon(new ImageIcon(BirthPaper.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_1.setBounds(0, 0, 309, 270);getContentPane().add(label_1);}
}

(13)DepartmentProprtionF

/*** 部门占比图表显示窗体* */package com.employee.frame;
import java.awt.BorderLayout;
import javax.swing.JDialog;
import com.employee.chart.PieDepartment;
public class DepartmentProprtionF extends JDialog {public DepartmentProprtionF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 1140, 586);setLocationRelativeTo(null);setModal(true);getContentPane().setLayout(new BorderLayout(0, 0));getContentPane().add(new PieDepartment().chartPanel);} catch (Exception e) {e.printStackTrace();}}
}

(14)DivianageF

/*** * 部门管理对话框*/package com.employee.frame;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import com.employee.dao.Dao;
import com.employee.implement.AllActionListener;
import com.employee.implement.AllMouseListener;import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JOptionPane;import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import java.awt.event.ActionEvent;
import com.employee.kit.ClearTextOfDepart;
import com.employee.kit.StringUtils;
import com.employee.model.Department;import javax.swing.border.LineBorder;
import java.awt.Color;
import java.awt.Font;
import javax.swing.ImageIcon;
public class DivianageF extends JDialog {public static  JTextField searchField;public static JTextField nameMarkField;public static  JTextField nameField;public static JTextField namePersonField;public static JTable table;private JScrollPane scrollPane;private  JLabel lNum;private   JLabel lName;private  JLabel lPerson;public static JButton deleteDepart;public static JButton modifyBtn;public static JButton historyDepart;public static JButton searchBtn ;public static  JButton clearBtn;private JLabel label_3;private JLabel label_4;private JLabel label_5;public DivianageF() {String sql2="select * from department";try {setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);setSize(1050,600);setLocationRelativeTo(null);setModal(true);}catch(Exception e) {e.printStackTrace();}setResizable(false);getContentPane().setLayout(null);{JPanel panel = new JPanel();panel.setBorder(new TitledBorder(null, "\u8868\u5355\u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel.setBounds(12, 76, 218, 332);getContentPane().add(panel);panel.setLayout(null);JLabel label = new JLabel("部门代号");label.setForeground(Color.GREEN);label.setBounds(12, 46, 59, 18);panel.add(label);nameMarkField = new JTextField();nameMarkField.setEditable(false);nameMarkField.setBounds(70, 44, 136, 22);panel.add(nameMarkField);nameMarkField.setColumns(10);JLabel label_1 = new JLabel("部门名称");label_1.setForeground(Color.GREEN);label_1.setBounds(12, 100, 59, 18);panel.add(label_1);nameField = new JTextField();nameField.setBounds(70, 98, 136, 22);panel.add(nameField);nameField.setColumns(10);JLabel label_2 = new JLabel("建立人");label_2.setForeground(Color.GREEN);label_2.setBounds(12, 153, 59, 18);panel.add(label_2);namePersonField = new JTextField();namePersonField.setBounds(70, 151, 136, 22);panel.add(namePersonField);namePersonField.setColumns(10);JButton button = new JButton("建立部门");button.setFont(new Font("Dialog", Font.BOLD, 8));button.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/增加.png")));button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new EstablishDepartmentF().setVisible(true);}});button.setBounds(12, 211, 87, 28);panel.add(button);deleteDepart = new JButton("撤销部门");deleteDepart.setFont(new Font("Dialog", Font.BOLD, 9));deleteDepart.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/删除.png")));deleteDepart.addActionListener(new AllActionListener());deleteDepart.setBounds(111, 211, 95, 28);panel.add(deleteDepart);modifyBtn = new JButton("修改部门");modifyBtn.setFont(new Font("Dialog", Font.BOLD, 8));modifyBtn.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/修改.png")));modifyBtn.addActionListener(new AllActionListener( ));modifyBtn.setBounds(12, 271, 87, 28);panel.add(modifyBtn);JButton button_3 = new JButton("清空");button_3.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/重置.png")));button_3.setFont(new Font("Dialog", Font.BOLD, 9));button_3.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {ClearTextOfDepart.clearDepartText();}});button_3.setBounds(111, 271, 95, 28);panel.add(button_3);}{{{}}}{JPanel panel = new JPanel();panel.setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "\u67E5\u627E\u7684\u4FE1\u606F", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(51, 51, 51)));panel.setBounds(817, 76, 221, 332);getContentPane().add(panel);panel.setLayout(null);lNum = new JLabel("");lNum.setBackground(Color.PINK);lNum.setFont(new Font("Dialog", Font.BOLD, 14));lNum.setBounds(12, 49, 197, 18);panel.add(lNum);lName = new JLabel("");lName.setFont(new Font("Dialog", Font.BOLD, 14));lName.setBounds(12, 121, 197, 18);panel.add(lName);lPerson = new JLabel(" ");lPerson.setFont(new Font("Dialog", Font.BOLD, 14));lPerson.setBounds(12, 199, 197, 18);panel.add(lPerson);label_5 = new JLabel(" ");label_5.setIcon(new ImageIcon(DivianageF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_5.setBounds(0, 22, 221, 310);panel.add(label_5);}JLabel label = new JLabel("部门名称");label.setForeground(Color.BLUE);label.setBounds(252, 46, 59, 18);getContentPane().add(label);searchField = new JTextField();searchField.setBounds(311, 42, 192, 22);getContentPane().add(searchField);searchField.setColumns(10);searchBtn = new JButton("查找");searchBtn.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/查找.png")));searchBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {if( StringUtils.isEmpty(searchField.getText())) {JOptionPane.showMessageDialog(null, "请输入!");}else {Department dep=new Department();dep.setNameMark(Integer.parseInt(searchField.getText()));String sql="select * from department where nameMark=?";try  {ResultSet rs= Dao.searchDepartment(dep, sql);while(rs.next()) {lNum.setText("部门代号:"+String.valueOf(rs.getInt(1)));lName.setText("部门名称:"+rs.getString(2));lPerson.setText("部门建立人:"+rs.getString(3));}} catch (SQLException e) {e.printStackTrace();}}}});searchBtn.setBounds(515, 42, 96, 22);getContentPane().add(searchBtn);JPanel panel = new JPanel();panel.setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "\u8868\u5355\u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(51, 51, 51)));panel.setBounds(12, 441, 1026, 89);getContentPane().add(panel);panel.setLayout(null);JButton button_2 = new JButton("刷新");button_2.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/刷新.png")));button_2.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {try {displayTable(new Dao().allData (sql2));} catch (SQLException e) {e.printStackTrace();}}});button_2.setBounds(478, 31, 78, 33);panel.add(button_2);label_3 = new JLabel(" ");label_3.setIcon(new ImageIcon(DivianageF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_3.setBounds(12, 12, 1014, 77);panel.add(label_3);scrollPane = new JScrollPane();scrollPane.setBounds(251, 76, 554, 332);getContentPane().add(scrollPane);try {table = new JTable();table.addMouseListener( new  AllMouseListener());table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u90E8\u95E8\u4EE3\u53F7", "\u90E8\u95E8\u540D\u79F0", "\u5EFA\u7ACB\u4EBA"}) {boolean[] columnEditables = new boolean[] {true, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});displayTable( Dao.allData (sql2));} catch (Exception e) {e.printStackTrace();}scrollPane.setViewportView(table);historyDepart = new JButton("历史纪录");historyDepart.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/历史记录.png")));historyDepart.setBounds(703, 45, 102, 21);getContentPane().add(historyDepart);clearBtn = new JButton("清空历史纪录");clearBtn.setIcon(new ImageIcon(DivianageF.class.getResource("/icons/重置.png")));clearBtn.addActionListener(new AllActionListener());clearBtn.setBounds(879, 420, 137, 23);getContentPane().add(clearBtn);label_4 = new JLabel(" ");label_4.setIcon(new ImageIcon(DivianageF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_4.setBounds(0, 12, 1050, 52);getContentPane().add(label_4);historyDepart.addActionListener(new AllActionListener());}public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) DivianageF.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt(1));v.add(rs.getString(2));v.add(rs.getString(3));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}
}

(15) DutyDesignD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import com.employee.implement.AllActionListener;import com.employee.kit.ClearDuty;
import com.employee.operate.FillComboBox;import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Color;public class DutyDesignD extends JDialog {public static JTextField numField;public static JButton saveBtn;public static JComboBox dutyName;public static JComboBox partName ;public static JButton clearBtn;public static JComboBox diplomaBox;public static JTextArea processField;public DutyDesignD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(531, 509);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setResizable(false);getContentPane().setLayout(null);{JLabel label = new JLabel("所属部门");label.setFont(new Font("Dialog", Font.BOLD, 14));label.setForeground(Color.BLUE);label.setBounds(121, 137, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("文凭要求");label.setFont(new Font("Dialog", Font.BOLD, 14));label.setForeground(Color.BLUE);label.setBounds(121, 181, 49, 18);getContentPane().add(label);}{JLabel label = new JLabel("招聘人 数");label.setFont(new Font("Dialog", Font.BOLD, 14));label.setForeground(Color.BLUE);label.setBounds(121, 227, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("招聘岗位");label.setFont(new Font("Dialog", Font.BOLD, 14));label.setForeground(Color.BLUE);label.setBounds(121, 86, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("招聘流程");label.setForeground(Color.RED);label.setBounds(12, 288, 59, 18);getContentPane().add(label);}{JLabel label = new JLabel("招聘计划");label.setForeground(Color.GREEN);label.setFont(new Font("Dialog", Font.BOLD, 22));label.setBounds(216, 12, 96, 38);getContentPane().add(label);}dutyName = new JComboBox();dutyName.setBounds(184, 84, 188, 23);getContentPane().add(dutyName);FillComboBox.fillDutyBox(dutyName);partName = new JComboBox();partName.setBounds(184, 135, 188, 23);getContentPane().add(partName);FillComboBox.fillPartBox(partName);//填充部门下拉框numField = new JTextField();numField.setBounds(184, 225, 189, 22);getContentPane().add(numField);numField.setColumns(10);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(66, 287, 422, 108);getContentPane().add(scrollPane);processField = new JTextArea();scrollPane.setViewportView(processField);{saveBtn = new JButton("保存");saveBtn.setIcon(new ImageIcon(DutyDesignD.class.getResource("/icons/保存(1).png")));saveBtn.addActionListener(new AllActionListener());saveBtn.setBounds(66, 439, 105, 28);getContentPane().add(saveBtn);}{clearBtn = new JButton("重置");clearBtn.setIcon(new ImageIcon(DutyDesignD.class.getResource("/icons/重置.png")));clearBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {ClearDuty.cleardutyDesignText();//清空招聘计划文本框}});clearBtn.setBounds(356, 439, 105, 28);getContentPane().add(clearBtn);}String dip[]= {"博士","研究生","本科","专科","大专","中专"};//初始化文凭下拉框diplomaBox = new JComboBox(dip);diplomaBox.setBounds(184, 179, 188, 23);getContentPane().add(diplomaBox);{JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(DutyDesignD.class.getResource("/images/a6.jpg")));label.setBounds(0, -29, 531, 496);getContentPane().add(label);}}
}

(16)DutyManagementF

/*** 职务及岗位管理窗体* */package com.employee.frame;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.TitledBorder;
import java.awt.Color;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import com.employee.dao.Dao;
import com.employee.implement.AllActionListener;
import com.employee.implement.AllMouseListener;import com.employee.operate.FillComboBox;
import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import java.awt.event.ActionEvent;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.border.LineBorder;
import java.awt.Font;
import javax.swing.ImageIcon;public class DutyManagementF extends JDialog {public static  JTextField numField;public static JTextField dutyField;public static JTable table;public static  JTextField searchField;public static  JComboBox comboBox ;public static JButton searchBtn;public static JLabel labelNum;public static JLabel labelName;public static JLabel labelPart;public static JButton deleteBtn;public static JButton modifyBtn;private JLabel label_4;public DutyManagementF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setResizable(false);setSize( 1185, 650);setLocationRelativeTo(null);setModal(true);getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBorder(new TitledBorder(new LineBorder(new Color(184, 207, 229)), "\u4FE1\u606F\u680F", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(51, 51, 51)));panel.setBounds(12, 88, 319, 377);getContentPane().add(panel);panel.setLayout(null);labelNum = new JLabel("");labelNum.setFont(new Font("Dialog", Font.BOLD, 15));labelNum.setBounds(34, 81, 273, 18);panel.add(labelNum);labelName = new JLabel("");labelName.setFont(new Font("Dialog", Font.BOLD, 15));labelName.setBounds(34, 154, 273, 18);panel.add(labelName);labelPart = new JLabel("");labelPart.setFont(new Font("Dialog", Font.BOLD, 15));labelPart.setBounds(34, 222, 273, 18);panel.add(labelPart);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(357, 97, 511, 368);getContentPane().add(scrollPane);table = new JTable();table.addMouseListener(new AllMouseListener());table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u5C97\u4F4D\u4EE3\u53F7", "\u5C97\u4F4D\u540D", "\u6240\u5C5E\u90E8\u95E8"}) {boolean[] columnEditables = new boolean[] {true, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});String sql="select * from duty";DutyManagementF.displayTable(Dao.allData(sql));//填充表格scrollPane.setViewportView(table);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u8868\u5355\u64CD\u4F5C", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(891, 88, 282, 377);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label = new JLabel("岗位代号");label.setForeground(Color.BLUE);label.setBounds(24, 52, 59, 18);panel_1.add(label);JLabel label_1 = new JLabel("岗位名");label_1.setForeground(Color.GREEN);label_1.setBounds(24, 98, 59, 18);panel_1.add(label_1);JLabel label_2 = new JLabel("所属部门");label_2.setForeground(Color.ORANGE);label_2.setBounds(24, 149, 59, 18);panel_1.add(label_2);numField = new JTextField();numField.setEditable(false);numField.setBounds(82, 50, 176, 22);panel_1.add(numField);numField.setColumns(10);dutyField = new JTextField();dutyField.setBounds(82, 96, 178, 22);panel_1.add(dutyField);dutyField.setColumns(10);comboBox = new JComboBox();FillComboBox.fillPartBox(comboBox);//填充下拉框comboBox.setBounds(82, 149, 176, 23);panel_1.add(comboBox);JButton addBtn = new JButton("建立岗位");addBtn.setFont(new Font("Dialog", Font.BOLD, 7));addBtn.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/增加.png")));addBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new AddDutyDialog().setVisible(true);}});addBtn.setBounds(24, 218, 82, 28);panel_1.add(addBtn);deleteBtn = new JButton("撤销岗位");deleteBtn.setFont(new Font("Dialog", Font.BOLD, 7));deleteBtn.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/删除.png")));deleteBtn.addActionListener(new  AllActionListener());deleteBtn.setBounds(176, 218, 82, 28);panel_1.add(deleteBtn);JButton clearBtn = new JButton("报表");clearBtn.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/分析.png")));clearBtn.setBounds(24, 274, 82, 28);panel_1.add(clearBtn);modifyBtn = new JButton("修改");modifyBtn.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/修改.png")));modifyBtn.addActionListener(new AllActionListener());modifyBtn.setBounds(176, 274, 82, 28);panel_1.add(modifyBtn);searchField = new JTextField();searchField.setBounds(420, 63, 182, 22);getContentPane().add(searchField);searchField.setColumns(10);JLabel label_3 = new JLabel("岗位代号");label_3.setFont(new Font("Dialog", Font.BOLD, 14));label_3.setForeground(Color.PINK);label_3.setBounds(355, 65, 59, 18);getContentPane().add(label_3);searchBtn = new JButton("查找");searchBtn.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/查找.png")));searchBtn.addActionListener(new  AllActionListener());//查找监听searchBtn.setBounds(614, 63, 79, 22);getContentPane().add(searchBtn);JButton button = new JButton("刷新");button.setIcon(new ImageIcon(DutyManagementF.class.getResource("/icons/刷新.png")));button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {try {DutyManagementF.displayTable(Dao.allData(sql));} catch (SQLException e) {e.printStackTrace();} }});button.setBounds(780, 63, 88, 25);getContentPane().add(button);label_4 = new JLabel(" ");label_4.setIcon(new ImageIcon(DutyManagementF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_4.setBounds(0, 0, 1185, 620);getContentPane().add(label_4);} catch (Exception e) {e.printStackTrace();}}public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) DutyManagementF.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt(1));v.add(rs.getString(2));v.add(rs.getString(3));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}
}

(17)EmployeeInfoClientF

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;import javax.swing.ComboBoxModel;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JToolBar;
import javax.swing.JMenu;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;
import java.awt.Window.Type;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import java.awt.Font;public class EmployeeInfoClientF extends JDialog {private JTextField textField_1;private JTextField textField_2;private final ButtonGroup buttonGroup = new ButtonGroup();private JTextField textField_3;private JTextField textField_4;private JTextField textField_5;private final ButtonGroup buttonGroup_1 = new ButtonGroup();private JTextField textField_6;private JTextField textField_7;private JTextField textField_8;private JTextField textField_9;private JTextField textField_10;private JTextField textField_11;private JTextField textField_12;private JTextField textField_13;private JTextField textField;private JTextField textField_14;private JTextField textField_15;private JTextField textField_16;private JTextField textField_17;public EmployeeInfoClientF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1023, 642);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBorder(new LineBorder(new Color(0, 255, 255), 2));panel.setBounds(10, 12, 976, 53);getContentPane().add(panel);panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));JLabel label = new JLabel("你的全部信息如下");label.setFont(new Font("Dialog", Font.BOLD, 20));panel.add(label);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u4FE1\u606F\u8868", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(10, 65, 976, 431);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label_1 = new JLabel("工号");label_1.setBounds(12, 28, 34, 18);panel_1.add(label_1);JLabel label_2 = new JLabel("姓名");label_2.setBounds(12, 72, 34, 18);panel_1.add(label_2);JLabel label_3 = new JLabel("性别");label_3.setBounds(12, 113, 34, 18);panel_1.add(label_3);JLabel label_4 = new JLabel("年龄");label_4.setBounds(12, 155, 34, 18);panel_1.add(label_4);JLabel label_5 = new JLabel("出生日期");label_5.setBounds(12, 199, 59, 18);panel_1.add(label_5);JLabel label_6 = new JLabel("民族");label_6.setBounds(189, 28, 44, 18);panel_1.add(label_6);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u4E2A\u4EBA\u7B80\u5386", TitledBorder.LEADING, TitledBorder.TOP, null, Color.BLACK));panel_2.setBounds(0, 307, 1188, 112);panel_1.add(panel_2);panel_2.setLayout(null);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(12, 22, 1176, 90);panel_2.add(scrollPane);JTextArea textArea = new JTextArea();textArea.setEditable(false);scrollPane.setViewportView(textArea);textField_1 = new JTextField();textField_1.setEditable(false);textField_1.setBounds(39, 26, 114, 22);panel_1.add(textField_1);textField_1.setColumns(10);textField_2 = new JTextField();textField_2.setEditable(false);textField_2.setBounds(39, 70, 114, 22);panel_1.add(textField_2);textField_2.setColumns(10);JRadioButton radioButton = new JRadioButton("男");buttonGroup.add(radioButton);radioButton.setBounds(39, 109, 44, 26);panel_1.add(radioButton);JRadioButton radioButton_1 = new JRadioButton("女");buttonGroup.add(radioButton_1);radioButton_1.setBounds(87, 109, 44, 26);panel_1.add(radioButton_1);textField_3 = new JTextField();textField_3.setEditable(false);textField_3.setBounds(39, 153, 44, 22);panel_1.add(textField_3);textField_3.setColumns(10);textField_4 = new JTextField();textField_4.setEditable(false);textField_4.setBounds(66, 197, 114, 22);panel_1.add(textField_4);textField_4.setColumns(10);JLabel label_7 = new JLabel("联系地址");label_7.setBounds(12, 238, 59, 18);panel_1.add(label_7);textField_5 = new JTextField();textField_5.setEditable(false);textField_5.setBounds(66, 236, 376, 22);panel_1.add(textField_5);textField_5.setColumns(10);JLabel label_8 = new JLabel("是否已婚");label_8.setBounds(189, 72, 59, 18);panel_1.add(label_8);JRadioButton radioButton_2 = new JRadioButton("是");buttonGroup_1.add(radioButton_2);radioButton_2.setBounds(251, 70, 44, 22);panel_1.add(radioButton_2);JRadioButton radioButton_3 = new JRadioButton("否");buttonGroup_1.add(radioButton_3);radioButton_3.setBounds(310, 72, 44, 18);panel_1.add(radioButton_3);JLabel label_9 = new JLabel("政治面貌");label_9.setBounds(189, 113, 59, 18);panel_1.add(label_9);JLabel label_10 = new JLabel("联系电话");label_10.setBounds(189, 155, 59, 18);panel_1.add(label_10);textField_6 = new JTextField();textField_6.setEditable(false);textField_6.setBounds(240, 153, 114, 22);panel_1.add(textField_6);textField_6.setColumns(10);JLabel label_11 = new JLabel("毕业学校");label_11.setBounds(397, 28, 59, 18);panel_1.add(label_11);textField_7 = new JTextField();textField_7.setEditable(false);textField_7.setBounds(454, 26, 114, 22);panel_1.add(textField_7);textField_7.setColumns(10);JLabel label_12 = new JLabel("所学专业");label_12.setBounds(397, 72, 59, 18);panel_1.add(label_12);textField_8 = new JTextField();textField_8.setEditable(false);textField_8.setBounds(454, 70, 114, 22);panel_1.add(textField_8);textField_8.setColumns(10);JLabel label_13 = new JLabel("文化程度");label_13.setBounds(397, 113, 59, 18);panel_1.add(label_13);JLabel label_14 = new JLabel("工作时间");label_14.setBounds(397, 155, 59, 18);panel_1.add(label_14);textField_9 = new JTextField();textField_9.setEditable(false);textField_9.setBounds(454, 153, 114, 22);panel_1.add(textField_9);textField_9.setColumns(10);JLabel label_15 = new JLabel("身份证号码");label_15.setBounds(204, 199, 80, 18);panel_1.add(label_15);textField_10 = new JTextField();textField_10.setEditable(false);textField_10.setBounds(272, 197, 170, 22);panel_1.add(textField_10);textField_10.setColumns(10);JLabel label_16 = new JLabel("工种");label_16.setBounds(667, 28, 44, 18);panel_1.add(label_16);JLabel label_17 = new JLabel("状态");label_17.setBounds(667, 72, 59, 18);panel_1.add(label_17);JPanel panel_3 = new JPanel();panel_3.setBorder(new LineBorder(Color.BLUE));panel_3.setBounds(854, 12, 122, 161);panel_1.add(panel_3);JLabel image = new JLabel("image");panel_3.add(image);JLabel label_18 = new JLabel("签约时间");label_18.setBounds(667, 113, 51, 18);panel_1.add(label_18);textField_11 = new JTextField();textField_11.setEditable(false);textField_11.setBounds(724, 111, 77, 22);panel_1.add(textField_11);textField_11.setColumns(10);JLabel label_19 = new JLabel("登记人");label_19.setBounds(667, 155, 51, 18);panel_1.add(label_19);textField_12 = new JTextField();textField_12.setEditable(false);textField_12.setBounds(724, 153, 77, 22);panel_1.add(textField_12);textField_12.setColumns(10);JLabel label_20 = new JLabel("银行卡号");label_20.setBounds(454, 199, 59, 18);panel_1.add(label_20);textField_13 = new JTextField();textField_13.setEditable(false);textField_13.setBounds(506, 197, 295, 22);panel_1.add(textField_13);textField_13.setColumns(10);textField = new JTextField();textField.setEditable(false);textField.setBounds(225, 26, 129, 22);panel_1.add(textField);textField.setColumns(10);textField_14 = new JTextField();textField_14.setEditable(false);textField_14.setBounds(240, 111, 114, 22);panel_1.add(textField_14);textField_14.setColumns(10);textField_15 = new JTextField();textField_15.setEditable(false);textField_15.setBounds(454, 111, 114, 22);panel_1.add(textField_15);textField_15.setColumns(10);textField_16 = new JTextField();textField_16.setEditable(false);textField_16.setBounds(700, 26, 114, 22);panel_1.add(textField_16);textField_16.setColumns(10);textField_17 = new JTextField();textField_17.setEditable(false);textField_17.setBounds(700, 70, 114, 22);panel_1.add(textField_17);textField_17.setColumns(10);JPanel panel_4 = new JPanel();panel_4.setBorder(new LineBorder(Color.PINK));panel_4.setBounds(10, 521, 976, 64);getContentPane().add(panel_4);panel_4.setLayout(null);}
}

(18)EmployeeInfoF

package com.employee.frame;import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;import com.employee.implement.AllActionListener;
import com.employee.operate.EmployeeFile;
import com.employee.operate.FillComboBox;import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;public class EmployeeInfoF extends JDialog {public static JTextField textField;public static JButton btnNewButton;public static JLabel label;public static JTextField jobNumField;public static JTextField nameField;public static final ButtonGroup buttonGroup = new ButtonGroup();public static JTextField ageField;public static JTextField birthDayField;public static JTextField addressField;private final ButtonGroup buttonGroup_1 = new ButtonGroup();public static JTextField phoneField;public static JTextField collageField;public static JTextField majorField;public static JTextField jobTime;public static JTextField id_cardField;public static JTextField signTimeField;public static JComboBox statusCombo;public static JTextField regesField;public static  JTextField creditNumField;public static JComboBox departCombo;public static JLabel imagePath;public static JButton bBtn;public static JButton fBtn;public static JTextArea textArea;public static JRadioButton manBtn;public static JRadioButton femalBtn ;public static JRadioButton yesBtn;public static JRadioButton noBtn;public static JComboBox profesionCombo;public static JComboBox raceField;public static JComboBox politcCombo;public static JComboBox cultureCombo;public static int index=1;public EmployeeInfoF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1023, 642);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBorder(new LineBorder(new Color(0, 255, 255), 2));panel.setBounds(10, 12, 976, 53);getContentPane().add(panel);panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));label = new JLabel("工号:");panel.add(label);textField = new JTextField();panel.add(textField);textField.setColumns(15);btnNewButton = new JButton("search");panel.add(btnNewButton);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u4FE1\u606F\u8868", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(10, 65, 976, 431);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label_1 = new JLabel("工号");label_1.setBounds(12, 28, 34, 18);panel_1.add(label_1);JLabel label_2 = new JLabel("姓名");label_2.setBounds(12, 72, 34, 18);panel_1.add(label_2);JLabel label_3 = new JLabel("性别");label_3.setBounds(12, 113, 34, 18);panel_1.add(label_3);JLabel label_4 = new JLabel("年龄");label_4.setBounds(12, 155, 34, 18);panel_1.add(label_4);JLabel label_5 = new JLabel("出生日期");label_5.setBounds(12, 199, 59, 18);panel_1.add(label_5);JLabel label_6 = new JLabel("民      族");label_6.setBounds(189, 28, 44, 18);panel_1.add(label_6);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u4E2A\u4EBA\u7B80\u5386", TitledBorder.LEADING, TitledBorder.TOP, null, Color.BLACK));panel_2.setBounds(0, 307, 1188, 112);panel_1.add(panel_2);panel_2.setLayout(null);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(12, 22, 1176, 90);panel_2.add(scrollPane);textArea = new JTextArea();scrollPane.setViewportView(textArea);jobNumField = new JTextField();jobNumField.setBounds(39, 26, 114, 22);panel_1.add(jobNumField);jobNumField.setColumns(10);nameField = new JTextField();nameField.setBounds(39, 70, 114, 22);panel_1.add(nameField);nameField.setColumns(10);manBtn = new JRadioButton("男");buttonGroup.add(manBtn);manBtn.setBounds(39, 109, 44, 26);panel_1.add(manBtn);femalBtn = new JRadioButton("女");buttonGroup.add(femalBtn);femalBtn.setBounds(87, 109, 44, 26);panel_1.add(femalBtn);ageField = new JTextField();ageField.setBounds(39, 153, 44, 22);panel_1.add(ageField);ageField.setColumns(10);birthDayField = new JTextField();birthDayField.setBounds(66, 197, 101, 22);panel_1.add(birthDayField);birthDayField.setColumns(10);String race[]= {"汉族","苗族","高山族","藏族"};raceField = new JComboBox(race);raceField.setBounds(240, 26, 114, 23);panel_1.add(raceField);JLabel label_7 = new JLabel("联系地址");label_7.setBounds(12, 238, 59, 18);panel_1.add(label_7);addressField = new JTextField();addressField.setBounds(66, 236, 376, 22);panel_1.add(addressField);addressField.setColumns(10);JLabel label_8 = new JLabel("是否已婚");label_8.setBounds(189, 72, 59, 18);panel_1.add(label_8);yesBtn = new JRadioButton("是");buttonGroup_1.add(yesBtn);yesBtn.setBounds(251, 70, 44, 22);panel_1.add(yesBtn);noBtn = new JRadioButton("否");buttonGroup_1.add(noBtn);noBtn.setBounds(310, 72, 44, 18);panel_1.add(noBtn);JLabel label_9 = new JLabel("政治面貌");label_9.setBounds(189, 113, 59, 18);panel_1.add(label_9);String politStatus[]= {"共青团员","党员","群众"};politcCombo = new JComboBox(politStatus);politcCombo.setBounds(243, 111, 111, 22);panel_1.add(politcCombo);JLabel label_10 = new JLabel("联系电话");label_10.setBounds(189, 155, 59, 18);panel_1.add(label_10);phoneField = new JTextField();phoneField.setBounds(240, 153, 114, 22);panel_1.add(phoneField);phoneField.setColumns(10);JLabel label_11 = new JLabel("毕业学校");label_11.setBounds(397, 28, 59, 18);panel_1.add(label_11);collageField = new JTextField();collageField.setBounds(454, 26, 114, 22);panel_1.add(collageField);collageField.setColumns(10);JLabel label_12 = new JLabel("所学专业");label_12.setBounds(397, 72, 59, 18);panel_1.add(label_12);majorField = new JTextField();majorField.setBounds(454, 70, 114, 22);panel_1.add(majorField);majorField.setColumns(10);JLabel label_13 = new JLabel("文化程度");label_13.setBounds(397, 113, 59, 18);panel_1.add(label_13);String culture[]= {"博士","硕士","本科","专科","专科","大专","中专"};cultureCombo = new JComboBox(culture);cultureCombo.setBounds(454, 111, 114, 22);panel_1.add(cultureCombo);JLabel label_14 = new JLabel("工作时间");label_14.setBounds(397, 155, 59, 18);panel_1.add(label_14);jobTime = new JTextField();jobTime.setBounds(454, 153, 114, 22);panel_1.add(jobTime);jobTime.setColumns(10);JLabel label_15 = new JLabel("身份证号码");label_15.setBounds(464, 238, 80, 18);panel_1.add(label_15);id_cardField = new JTextField();id_cardField.setBounds(536, 236, 265, 22);panel_1.add(id_cardField);id_cardField.setColumns(10);JLabel label_16 = new JLabel("工种");label_16.setBounds(667, 28, 44, 18);panel_1.add(label_16);profesionCombo = new JComboBox();FillComboBox.fillDutyBox(profesionCombo);profesionCombo.setBounds(700, 24, 101, 22);panel_1.add(profesionCombo);JLabel label_17 = new JLabel("状态");label_17.setBounds(667, 72, 59, 18);panel_1.add(label_17);String stus[]= {"在职","离职","后备"};statusCombo = new JComboBox(stus);statusCombo.setBounds(700, 68, 101, 22);panel_1.add(statusCombo);JPanel panel_3 = new JPanel();panel_3.setBorder(new LineBorder(Color.BLUE));panel_3.setBounds(854, 12, 122, 161);panel_1.add(panel_3);imagePath = new JLabel("image");panel_3.add(imagePath);JLabel label_18 = new JLabel("签约时间");label_18.setBounds(667, 113, 51, 18);panel_1.add(label_18);signTimeField = new JTextField();signTimeField.setBounds(724, 111, 77, 22);panel_1.add(signTimeField);signTimeField.setColumns(10);JLabel label_19 = new JLabel("登记人");label_19.setBounds(667, 155, 51, 18);panel_1.add(label_19);regesField = new JTextField();regesField.setBounds(724, 153, 77, 22);panel_1.add(regesField);regesField.setColumns(10);JLabel label_20 = new JLabel("银行卡号");label_20.setBounds(464, 199, 59, 18);panel_1.add(label_20);creditNumField = new JTextField();creditNumField.setBounds(537, 197, 264, 22);panel_1.add(creditNumField);creditNumField.setColumns(10);departCombo = new JComboBox();FillComboBox.fillPartBox(departCombo );departCombo.setBounds(243, 197, 114, 22);panel_1.add(departCombo);JLabel label_21 = new JLabel("所属部门");label_21.setBounds(189, 199, 59, 18);panel_1.add(label_21);JLabel label_22 = new JLabel(" ");label_22.setIcon(new ImageIcon(EmployeeInfoF.class.getResource("/images/4c16bccd748a7cbd540b8509154b6b45.jpg")));label_22.setBounds(0, -64, 1014, 388);panel_1.add(label_22);JPanel panel_4 = new JPanel();panel_4.setBorder(new LineBorder(Color.PINK));panel_4.setBounds(10, 521, 976, 64);getContentPane().add(panel_4);panel_4.setLayout(null);EmployeeFile.showEmpAData(index);fBtn = new JButton("<");fBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {index--;if(index<=0) {index=1;}EmployeeFile.showEmpAData(index);}});fBtn.setBounds(354, 12, 105, 28);panel_4.add(fBtn);bBtn = new JButton(">");bBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {index++;EmployeeFile.showEmpAData(index);}});bBtn.setBounds(509, 12, 105, 28);panel_4.add(bBtn);JLabel label_23 = new JLabel(" ");label_23.setIcon(new ImageIcon(EmployeeInfoF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_23.setBounds(0, 0, 976, 64);panel_4.add(label_23);}
}

(19)EmployeeInfoF2

/*** 学生简历填写*/
package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;import javax.swing.ComboBoxModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JToolBar;
import javax.swing.JMenu;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;import com.employee.implement.AllActionListener;
import com.employee.operate.FillComboBox;import java.awt.Window.Type;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import java.awt.Font;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;public class EmployeeInfoF2 extends JDialog {public static JTextField nameField;public static final ButtonGroup buttonGroup = new ButtonGroup();public static JTextField ageField;public static JTextField birthDayField;public static JTextField addressField;public static final ButtonGroup buttonGroup_1 = new ButtonGroup();public static JTextField phoneNumField;public static JTextField collageField;public static JTextField majorField;public static JTextField jobTimeField;public static JTextField id_cardField;public static JTextField creditNumField;public static JButton submitBtn;public static JRadioButton manBtn;public static JRadioButton femalBtn;public static JComboBox comborace;public static JComboBox comboPolitStatus;public static JComboBox comboCulture;public static JComboBox comboType;public static JRadioButton yesBtn;public static JRadioButton noBtn;public static File selectedFile;public static JLabel image;public static JTextArea textArea;public EmployeeInfoF2() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1023, 642);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBorder(new LineBorder(new Color(0, 255, 255), 2));panel.setBounds(10, 12, 976, 53);getContentPane().add(panel);panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));JLabel label = new JLabel("请填写你的个人信息");label.setForeground(Color.GRAY);label.setFont(new Font("Dialog", Font.BOLD, 20));panel.add(label);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u4FE1\u606F\u8868", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(10, 65, 976, 431);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label_2 = new JLabel("姓名");label_2.setBounds(12, 72, 34, 18);panel_1.add(label_2);JLabel label_3 = new JLabel("性别");label_3.setBounds(12, 113, 34, 18);panel_1.add(label_3);JLabel label_4 = new JLabel("年龄");label_4.setBounds(12, 155, 34, 18);panel_1.add(label_4);JLabel label_5 = new JLabel("出生日期");label_5.setBounds(12, 199, 59, 18);panel_1.add(label_5);JLabel label_6 = new JLabel("民族");label_6.setBounds(264, 28, 44, 18);panel_1.add(label_6);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u4E2A\u4EBA\u7B80\u5386", TitledBorder.LEADING, TitledBorder.TOP, null, Color.BLACK));panel_2.setBounds(0, 307, 1188, 112);panel_1.add(panel_2);panel_2.setLayout(null);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(12, 22, 1176, 90);panel_2.add(scrollPane);textArea = new JTextArea();scrollPane.setViewportView(textArea);nameField = new JTextField();nameField.setBounds(66, 70, 114, 22);panel_1.add(nameField);nameField.setColumns(10);manBtn = new JRadioButton("男");buttonGroup.add(manBtn);manBtn.setBounds(75, 109, 44, 26);panel_1.add(manBtn);femalBtn = new JRadioButton("女");buttonGroup.add(femalBtn);femalBtn.setBounds(136, 109, 44, 26);panel_1.add(femalBtn);ageField = new JTextField();ageField.setBounds(64, 153, 116, 22);panel_1.add(ageField);ageField.setColumns(10);birthDayField = new JTextField();birthDayField.setBounds(66, 197, 114, 22);panel_1.add(birthDayField);birthDayField.setColumns(10);String race[]= {"汉族","苗族","高山族","藏族"};comborace = new JComboBox(race);comborace.setBounds(310, 26, 132, 23);panel_1.add(comborace);JLabel label_7 = new JLabel("联系地址");label_7.setBounds(12, 238, 59, 18);panel_1.add(label_7);addressField = new JTextField();addressField.setBounds(66, 236, 376, 22);panel_1.add(addressField);addressField.setColumns(10);JLabel label_8 = new JLabel("是否已婚");label_8.setBounds(264, 72, 59, 18);panel_1.add(label_8);yesBtn = new JRadioButton("是");buttonGroup_1.add(yesBtn);yesBtn.setBounds(323, 70, 44, 22);panel_1.add(yesBtn);noBtn = new JRadioButton("否");buttonGroup_1.add(noBtn);noBtn.setBounds(371, 72, 44, 18);panel_1.add(noBtn);JLabel label_9 = new JLabel("政治面貌");label_9.setBounds(264, 113, 59, 18);panel_1.add(label_9);String politStatus[]= {"共青团员","党员","群众"};comboPolitStatus = new JComboBox(politStatus);comboPolitStatus.setBounds(323, 111, 119, 22);panel_1.add(comboPolitStatus);JLabel label_10 = new JLabel("联系电话");label_10.setBounds(264, 155, 59, 18);panel_1.add(label_10);phoneNumField = new JTextField();phoneNumField.setBounds(328, 153, 114, 22);panel_1.add(phoneNumField);phoneNumField.setColumns(10);JLabel label_11 = new JLabel("毕业学校");label_11.setBounds(551, 28, 59, 18);panel_1.add(label_11);collageField = new JTextField();collageField.setBounds(613, 26, 114, 22);panel_1.add(collageField);collageField.setColumns(10);JLabel label_12 = new JLabel("所学专业");label_12.setBounds(551, 72, 59, 18);panel_1.add(label_12);majorField = new JTextField();majorField.setBounds(613, 70, 114, 22);panel_1.add(majorField);majorField.setColumns(10);JLabel label_13 = new JLabel("文化程度");label_13.setBounds(551, 113, 59, 18);panel_1.add(label_13);String culture[]= {"博士","硕士","本科","专科","专科","大专","中专"};comboCulture = new JComboBox(culture);comboCulture.setBounds(613, 111, 114, 22);panel_1.add(comboCulture);JLabel label_14 = new JLabel("工作时间");label_14.setBounds(551, 155, 59, 18);panel_1.add(label_14);jobTimeField = new JTextField();jobTimeField.setBounds(613, 153, 114, 22);panel_1.add(jobTimeField);jobTimeField.setColumns(10);JLabel label_15 = new JLabel("身份证号码");label_15.setBounds(204, 199, 80, 18);panel_1.add(label_15);id_cardField = new JTextField();id_cardField.setBounds(272, 197, 170, 22);panel_1.add(id_cardField);id_cardField.setColumns(10);JLabel label_16 = new JLabel("申请职位");label_16.setBounds(12, 26, 59, 18);panel_1.add(label_16);comboType = new JComboBox();FillComboBox.fillDutyBox(comboType);comboType.setBounds(66, 26, 114, 22);panel_1.add(comboType);String status[]= {"在职","离职","后备"};JPanel imagePath = new JPanel();imagePath.setBorder(new LineBorder(Color.BLUE));imagePath.setBounds(842, 12, 122, 161);panel_1.add(imagePath);imagePath.setLayout(null);image = new JLabel("+");//添加照片image.addMouseListener(new MouseAdapter() {@Overridepublic void mousePressed(MouseEvent e) {JFileChooser file=new JFileChooser();int i=file.showOpenDialog(getContentPane());if(i==JFileChooser.APPROVE_OPTION) {selectedFile=file.getSelectedFile();image.setIcon(new ImageIcon(selectedFile.getAbsolutePath()));}}});image.setHorizontalAlignment(SwingConstants.CENTER);image.setFont(new Font("Dialog", Font.BOLD, 25));image.setBounds(0, 0, 122, 161);imagePath.add(image);JLabel label_20 = new JLabel("银行卡号");label_20.setBounds(454, 199, 59, 18);panel_1.add(label_20);creditNumField = new JTextField();creditNumField.setBounds(506, 197, 295, 22);panel_1.add(creditNumField);creditNumField.setColumns(10);JLabel label_17 = new JLabel(" ");label_17.setIcon(new ImageIcon(EmployeeInfoF2.class.getResource("/images/ff8b9250ae01da21c60136a866fe41c2.jpg")));label_17.setBounds(-13, -62, 1022, 508);panel_1.add(label_17);JPanel panel_4 = new JPanel();panel_4.setBorder(new LineBorder(Color.PINK));panel_4.setBounds(10, 521, 976, 64);getContentPane().add(panel_4);panel_4.setLayout(null);submitBtn = new JButton("提交");submitBtn.setIcon(new ImageIcon(EmployeeInfoF2.class.getResource("/icons/保存(1).png")));submitBtn.addActionListener( new AllActionListener());submitBtn.setBounds(378, 12, 188, 28);panel_4.add(submitBtn);JLabel label_1 = new JLabel(" ");label_1.setIcon(new ImageIcon(EmployeeInfoF2.class.getResource("/images/ff8b9250ae01da21c60136a866fe41c2.jpg")));label_1.setBounds(12, 0, 964, 64);panel_4.add(label_1);}
}

(20) EmployeeInfoFShow

/*** 学生简历填写*/
package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;import javax.swing.ComboBoxModel;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JToolBar;
import javax.swing.JMenu;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;import com.employee.dao.Dao;
import com.employee.implement.AllActionListener;
import com.employee.model.Employee;import com.employee.operate.FillComboBox;
import com.employee.operate.EmployeeFile;import java.awt.Window.Type;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import java.awt.Font;import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;public class EmployeeInfoFShow extends JDialog {public static JTextField nameField;public static final ButtonGroup buttonGroup = new ButtonGroup();public static JTextField ageField;public static JTextField addressField;public static final ButtonGroup buttonGroup_1 = new ButtonGroup();public static JTextField phoneNumField;public static JTextField collageField;public static JTextField majorField;public static JTextField id_cardField;public static JTextField creditNumField;public static JButton submitBtn;public static JRadioButton manBtn;public static JRadioButton femalBtn;public static JComboBox comborace;public static JComboBox comboPolitStatus;public static JComboBox comboCulture;public static JComboBox comboType;public static JRadioButton yesBtn;public static JRadioButton noBtn;public static File selectedFile;public static JLabel image;public static JTextArea textArea;public static List list;private int index=1;public static JButton saveBtn;public static JTextField birthDayField;public static JTextField jobTimeField;public EmployeeInfoFShow() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1023, 642);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBorder(new LineBorder(new Color(0, 255, 255), 2));panel.setBounds(10, 12, 976, 53);getContentPane().add(panel);panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));JLabel label = new JLabel("学生简历");label.setFont(new Font("Dialog", Font.BOLD, 20));panel.add(label);JPanel panel_1 = new JPanel();panel_1.setBorder(new TitledBorder(null, "\u4FE1\u606F\u8868", TitledBorder.LEADING, TitledBorder.TOP, null, null));panel_1.setBounds(10, 65, 976, 431);getContentPane().add(panel_1);panel_1.setLayout(null);JLabel label_2 = new JLabel("姓名");label_2.setBounds(12, 72, 34, 18);panel_1.add(label_2);JLabel label_3 = new JLabel("性别");label_3.setBounds(12, 113, 34, 18);panel_1.add(label_3);JLabel label_4 = new JLabel("年龄");label_4.setBounds(12, 155, 34, 18);panel_1.add(label_4);JLabel label_5 = new JLabel("出生日期");label_5.setBounds(12, 199, 59, 18);panel_1.add(label_5);JLabel label_6 = new JLabel("民族");label_6.setBounds(264, 28, 44, 18);panel_1.add(label_6);JPanel panel_2 = new JPanel();panel_2.setBorder(new TitledBorder(null, "\u4E2A\u4EBA\u7B80\u5386", TitledBorder.LEADING, TitledBorder.TOP, null, Color.BLACK));panel_2.setBounds(0, 307, 1188, 112);panel_1.add(panel_2);panel_2.setLayout(null);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(12, 22, 1176, 90);panel_2.add(scrollPane);textArea = new JTextArea();scrollPane.setViewportView(textArea);nameField = new JTextField();nameField.setBounds(66, 70, 114, 22);panel_1.add(nameField);nameField.setColumns(10);manBtn = new JRadioButton("男");buttonGroup.add(manBtn);manBtn.setBounds(75, 109, 44, 26);panel_1.add(manBtn);femalBtn = new JRadioButton("女");buttonGroup.add(femalBtn);femalBtn.setBounds(136, 109, 44, 26);panel_1.add(femalBtn);ageField = new JTextField();ageField.setBounds(64, 153, 116, 22);panel_1.add(ageField);ageField.setColumns(10);String race[]= {"汉族","苗族","高山族","藏族"};comborace = new JComboBox(race);comborace.setBounds(310, 26, 132, 23);panel_1.add(comborace);JLabel label_7 = new JLabel("联系地址");label_7.setBounds(12, 238, 59, 18);panel_1.add(label_7);addressField = new JTextField();addressField.setBounds(66, 236, 376, 22);panel_1.add(addressField);addressField.setColumns(10);JLabel label_8 = new JLabel("是否已婚");label_8.setBounds(264, 72, 59, 18);panel_1.add(label_8);yesBtn = new JRadioButton("是");buttonGroup_1.add(yesBtn);yesBtn.setBounds(323, 70, 44, 22);panel_1.add(yesBtn);noBtn = new JRadioButton("否");buttonGroup_1.add(noBtn);noBtn.setBounds(371, 72, 44, 18);panel_1.add(noBtn);JLabel label_9 = new JLabel("政治面貌");label_9.setBounds(264, 113, 59, 18);panel_1.add(label_9);String politStatus[]= {"共青团员","党员","群众"};comboPolitStatus = new JComboBox(politStatus);comboPolitStatus.setBounds(323, 111, 119, 22);panel_1.add(comboPolitStatus);JLabel label_10 = new JLabel("联系电话");label_10.setBounds(264, 155, 59, 18);panel_1.add(label_10);phoneNumField = new JTextField();phoneNumField.setBounds(328, 153, 114, 22);panel_1.add(phoneNumField);phoneNumField.setColumns(10);JLabel label_11 = new JLabel("毕业学校");label_11.setBounds(551, 28, 59, 18);panel_1.add(label_11);collageField = new JTextField();collageField.setBounds(613, 26, 114, 22);panel_1.add(collageField);collageField.setColumns(10);JLabel label_12 = new JLabel("所学专业");label_12.setBounds(551, 72, 59, 18);panel_1.add(label_12);majorField = new JTextField();majorField.setBounds(613, 70, 114, 22);panel_1.add(majorField);majorField.setColumns(10);JLabel label_13 = new JLabel("文化程度");label_13.setBounds(551, 113, 59, 18);panel_1.add(label_13);String culture[]= {"博士","硕士","本科","专科","专科","大专","中专"};comboCulture = new JComboBox(culture);comboCulture.setBounds(613, 111, 114, 22);panel_1.add(comboCulture);JLabel label_14 = new JLabel("工作时间");label_14.setBounds(551, 155, 59, 18);panel_1.add(label_14);JLabel label_15 = new JLabel("身份证号码");label_15.setBounds(551, 199, 80, 18);panel_1.add(label_15);id_cardField = new JTextField();id_cardField.setBounds(613, 197, 170, 22);panel_1.add(id_cardField);id_cardField.setColumns(10);JLabel label_16 = new JLabel("申请职位");label_16.setBounds(12, 26, 59, 18);panel_1.add(label_16);comboType = new JComboBox();FillComboBox.fillDutyBox(comboType);comboType.setBounds(66, 26, 114, 22);panel_1.add(comboType);String status[]= {"在职","离职","后备"};JPanel imagePath = new JPanel();imagePath.setBorder(new LineBorder(Color.BLUE));imagePath.setBounds(842, 12, 122, 161);panel_1.add(imagePath);imagePath.setLayout(null);image = new JLabel("+");//添加照片image.setHorizontalAlignment(SwingConstants.CENTER);image.setFont(new Font("Dialog", Font.BOLD, 25));image.setBounds(0, 0, 122, 161);imagePath.add(image);JLabel label_20 = new JLabel("银行卡号");label_20.setBounds(551, 238, 59, 18);panel_1.add(label_20);creditNumField = new JTextField();creditNumField.setBounds(613, 236, 295, 22);panel_1.add(creditNumField);creditNumField.setColumns(10);birthDayField = new JTextField();birthDayField.setBounds(66, 197, 114, 22);panel_1.add(birthDayField);birthDayField.setColumns(10);jobTimeField = new JTextField();jobTimeField.setBounds(613, 153, 114, 22);panel_1.add(jobTimeField);jobTimeField.setColumns(10);JLabel label_1 = new JLabel(" ");label_1.setIcon(new ImageIcon(EmployeeInfoFShow.class.getResource("/images/4c16bccd748a7cbd540b8509154b6b45.jpg")));label_1.setBounds(0, -62, 1012, 493);panel_1.add(label_1);JPanel panel_4 = new JPanel();panel_4.setBorder(new LineBorder(Color.PINK));panel_4.setBounds(10, 521, 976, 64);getContentPane().add(panel_4);panel_4.setLayout(null);/*** 初始化*/EmployeeFile.showD(index);submitBtn = new JButton(" ");submitBtn.setIcon(new ImageIcon(EmployeeInfoFShow.class.getResource("/icons/右.png")));submitBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {index++;EmployeeFile.showD(index);}});submitBtn.setBounds(510, 12, 58, 28);panel_4.add(submitBtn);JButton button = new JButton(" ");button.setIcon(new ImageIcon(EmployeeInfoFShow.class.getResource("/icons/左.png")));button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {index--;if(index<0) {index=1;}EmployeeFile.showD(index);}});button.setBounds(402, 12, 65, 28);panel_4.add(button);saveBtn = new JButton("录用");saveBtn.setIcon(new ImageIcon(EmployeeInfoFShow.class.getResource("/icons/招聘录用.png")));saveBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new EmployInfoD().setVisible(true);}});saveBtn.setBounds(836, 12, 88, 28);panel_4.add(saveBtn);JLabel label_17 = new JLabel(" ");label_17.setIcon(new ImageIcon(EmployeeInfoFShow.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_17.setBounds(12, 0, 964, 64);panel_4.add(label_17);}
}

(21)EmployeeLoginF

package com.employee.frame;import javax.swing.JButton;
import javax.swing.JDialog;import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;import com.employee.implement.RegisterAction;import javax.swing.JPasswordField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;public class EmployeeLoginF extends JDialog {private JTextField textField;private JPasswordField passwordField;/*** Launch the application.*/public static void main(String[] args) {try {EmployeeLoginF dialog = new EmployeeLoginF();dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);dialog.setVisible(true);dialog.setResizable(false);dialog.setBounds(100, 100, 581, 420);dialog.setModal(true);} catch (Exception e) {e.printStackTrace();}}/*** Create the dialog.*/public EmployeeLoginF() {getContentPane().setLayout(null);{JLabel lblEmployee = new JLabel("Employee");lblEmployee.setFont(new Font("Dialog", Font.BOLD, 30));lblEmployee.setBounds(231, 52, 156, 89);getContentPane().add(lblEmployee);}{JLabel lblAccount = new JLabel("Account:");lblAccount.setFont(new Font("Dialog", Font.BOLD, 14));lblAccount.setBounds(138, 173, 75, 23);getContentPane().add(lblAccount);}{JLabel lblPassword = new JLabel("Password:");lblPassword.setFont(new Font("Dialog", Font.BOLD, 14));lblPassword.setBounds(138, 224, 75, 20);getContentPane().add(lblPassword);}textField = new JTextField();textField.setBounds(215, 175, 223, 22);getContentPane().add(textField);textField.setColumns(10);passwordField = new JPasswordField();passwordField.setBounds(215, 223, 223, 22);getContentPane().add(passwordField);JButton btnNewButton = new JButton("Login");btnNewButton.setIcon(new ImageIcon(EmployeeLoginF.class.getResource("/icons/ok.png")));btnNewButton.setBounds(138, 281, 105, 28);getContentPane().add(btnNewButton);JLabel lblForgetThePassword = new JLabel("forget the password?");lblForgetThePassword.setBounds(428, 358, 156, 18);getContentPane().add(lblForgetThePassword);JButton btnRegister = new JButton("Register");btnRegister.setIcon(new ImageIcon(EmployeeLoginF.class.getResource("/images/注册用户.png")));btnRegister.addActionListener(new RegisterAction());btnRegister.setBounds(333, 281, 105, 28);getContentPane().add(btnRegister);JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(EmployeeLoginF.class.getResource("/images/a6.jpg")));label.setBounds(0, 0, 584, 376);getContentPane().add(label);}
}

(22)EmployInfoD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import com.employee.implement.AllActionListener;
import com.employee.operate.FillComboBox;import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Color;public class EmployInfoD extends JDialog {public static  JTextField nameMark;public static JTextField yearField;public static JTextField monthField;public static JTextField regisPerson;public static JButton saveBtn;public static JComboBox statusCombo ;public static  JTextField dField;public static JComboBox departCombo;public EmployInfoD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(486, 475);setLocationRelativeTo(null);setResizable(false);setModal(true);} catch (Exception e) {e.printStackTrace();}setTitle("手续办理");getContentPane().setLayout(null);{JLabel label = new JLabel("请为此员工办理入职手续");label.setForeground(Color.ORANGE);label.setFont(new Font("Dialog", Font.BOLD, 25));label.setBounds(103, 23, 285, 41);getContentPane().add(label);}{JLabel label = new JLabel("员工工号:");label.setForeground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(51, 105, 92, 34);getContentPane().add(label);}{JLabel label = new JLabel("状    态:");label.setForeground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(52, 165, 91, 28);getContentPane().add(label);}{JLabel label = new JLabel("签约时间:");label.setForeground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(51, 269, 92, 34);getContentPane().add(label);}{JLabel label = new JLabel("登 记 人:");label.setForeground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(51, 315, 92, 34);getContentPane().add(label);}saveBtn = new JButton("确定");saveBtn.setIcon(new ImageIcon(EmployInfoD.class.getResource("/icons/ok.png")));saveBtn.addActionListener(new AllActionListener());saveBtn.setFont(new Font("Dialog", Font.BOLD, 18));saveBtn.setBounds(296, 372, 105, 28);getContentPane().add(saveBtn);JButton cancelBtn = new JButton("取消");cancelBtn.setIcon(new ImageIcon(EmployInfoD.class.getResource("/icons/取消.png")));cancelBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {dispose();}});cancelBtn.setFont(new Font("Dialog", Font.BOLD, 18));cancelBtn.setBounds(116, 372, 105, 28);getContentPane().add(cancelBtn);nameMark = new JTextField();nameMark.setBounds(161, 114, 253, 22);getContentPane().add(nameMark);nameMark.setColumns(10);String status[]= {"在职","离职","后备"};statusCombo = new JComboBox(status);//初始化列表框statusCombo.setBounds(161, 169, 253, 27);getContentPane().add(statusCombo);JLabel label = new JLabel("年");label.setForeground(Color.RED);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(236, 277, 33, 18);getContentPane().add(label);yearField = new JTextField();yearField.setBounds(161, 278, 69, 22);getContentPane().add(yearField);yearField.setColumns(10);monthField = new JTextField();monthField.setBounds(262, 278, 50, 22);getContentPane().add(monthField);monthField.setColumns(10);JLabel label_1 = new JLabel("月");label_1.setForeground(Color.RED);label_1.setFont(new Font("Dialog", Font.BOLD, 18));label_1.setBounds(322, 277, 39, 18);getContentPane().add(label_1);regisPerson = new JTextField();regisPerson.setBounds(161, 324, 253, 22);getContentPane().add(regisPerson);regisPerson.setColumns(10);dField = new JTextField();dField.setBounds(344, 278, 39, 22);getContentPane().add(dField);dField.setColumns(10);JLabel de = new JLabel("日");de.setForeground(Color.RED);de.setFont(new Font("Dialog", Font.BOLD, 18));de.setBounds(390, 277, 39, 18);getContentPane().add(de);JLabel label_2 = new JLabel("部    门:");label_2.setForeground(Color.RED);label_2.setFont(new Font("Dialog", Font.BOLD, 18));label_2.setBounds(51, 217, 91, 28);getContentPane().add(label_2);departCombo = new JComboBox();FillComboBox.fillPartBox(departCombo);//填充下拉框departCombo.setBounds(161, 221, 253, 27);getContentPane().add(departCombo);JLabel label_3 = new JLabel(" ");label_3.setIcon(new ImageIcon(EmployInfoD.class.getResource("/images/a6.jpg")));label_3.setBounds(0, 0, 486, 463);getContentPane().add(label_3);}
}

(23)EstablishDepartmentF

/*** * 建立部门对话框*/package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import com.employee.implement.AllActionListener;
import com.employee.kit.ClearTextOfDepart;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Color;
public class EstablishDepartmentF extends JDialog {public static  JTextField nameMarkField;public static JTextField nameField;public static JTextField namePersonField;public static JButton addBtn;public EstablishDepartmentF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 415, 324);setLocationRelativeTo(null);setResizable(false);setModal(true);} catch (Exception e) {e.printStackTrace();}setTitle("建立部门");getContentPane().setLayout(null);JLabel label = new JLabel("部门代号");label.setForeground(Color.BLUE);label.setBounds(70, 72, 59, 18);getContentPane().add(label);JLabel label_1 = new JLabel("部门名称");label_1.setForeground(Color.BLUE);label_1.setBounds(70, 118, 59, 18);getContentPane().add(label_1);nameMarkField = new JTextField();nameMarkField.setBounds(131, 70, 190, 22);getContentPane().add(nameMarkField);nameMarkField.setColumns(10);nameField = new JTextField();nameField.setBounds(131, 114, 190, 22);getContentPane().add(nameField);nameField.setColumns(10);addBtn = new JButton("建立");addBtn.setIcon(new ImageIcon(EstablishDepartmentF.class.getResource("/icons/增加.png")));addBtn.addActionListener(new AllActionListener());addBtn.setBounds(70, 212, 105, 28);getContentPane().add(addBtn);JButton button_1 = new JButton("重置");button_1.setIcon(new ImageIcon(EstablishDepartmentF.class.getResource("/icons/重置.png")));button_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {ClearTextOfDepart.clearEstablishText();}});button_1.setBounds(216, 212, 105, 28);getContentPane().add(button_1);JLabel label_2 = new JLabel("建立部门");label_2.setForeground(Color.RED);label_2.setFont(new Font("Dialog", Font.BOLD, 20));label_2.setBounds(161, 22, 94, 36);getContentPane().add(label_2);JLabel label_3 = new JLabel("建立人");label_3.setForeground(Color.BLUE);label_3.setBounds(70, 148, 59, 18);getContentPane().add(label_3);namePersonField = new JTextField();namePersonField.setBounds(131, 148, 190, 22);getContentPane().add(namePersonField);namePersonField.setColumns(10);JLabel label_4 = new JLabel(" ");label_4.setIcon(new ImageIcon(EstablishDepartmentF.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_4.setBounds(-14, -28, 429, 322);getContentPane().add(label_4);}
}

(24)

package com.employee.frame;
import javax.swing.JButton;
import javax.swing.JDialog;import com.employee.implement.AllActionListener;import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import java.awt.Font;import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.ImageIcon;
import java.awt.Color;public class Login extends JDialog {public static JTextField accountField;public static JPasswordField passwordField;public static JButton LoginButton;public static Login dialog;/*** Launch the application.*/public static void main(String[] args) {try {dialog = new Login();dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);dialog.setVisible(true);} catch (Exception e) {e.printStackTrace();}}/*** Create the dialog.*/public Login() {setResizable(false);setTitle("企业人力资源管理系统");setSize(  649, 466);setLocationRelativeTo(null);getContentPane().setLayout(null);JLabel accountText = new JLabel("Account:");accountText.setFont(new Font("Dialog", Font.BOLD, 13));accountText.setForeground(Color.RED);accountText.setBounds(183, 182, 59, 18);getContentPane().add(accountText);JLabel passwordText = new JLabel("Password:");passwordText.setFont(new Font("Dialog", Font.BOLD, 13));passwordText.setForeground(Color.RED);passwordText.setBounds(181, 231, 72, 18);getContentPane().add(passwordText);accountField = new JTextField();accountField.setText(" ");accountField.setBounds(245, 180, 206, 22);getContentPane().add(accountField);accountField.setColumns(10);passwordField = new JPasswordField();passwordField.setEchoChar('*');passwordField.setBounds(245, 229, 206, 22);getContentPane().add(passwordField);JLabel Administrator = new JLabel("Administrator");Administrator.setFont(new Font("Dialog", Font.BOLD, 30));Administrator.setBounds(208, 66, 216, 85);getContentPane().add(Administrator);LoginButton = new JButton("Login");LoginButton.setIcon(new ImageIcon(Login.class.getResource("/icons/ok.png")));LoginButton.addActionListener(new AllActionListener() );//登陆监听事件LoginButton.setBounds(183, 283, 268, 28);getContentPane().add(LoginButton);JLabel passwordForget = new JLabel("forget the password?");passwordForget.setBounds(264, 323, 137, 18);getContentPane().add(passwordForget);JLabel lblRegister = new JLabel("Register");lblRegister.addMouseListener(new MouseAdapter() {@Overridepublic void mousePressed(MouseEvent e) {new  RegisterF().setVisible(true);}});lblRegister.setFont(new Font("Dialog", Font.BOLD, 15));lblRegister.setBounds(12, 396, 78, 28);getContentPane().add(lblRegister);JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(Login.class.getResource("/images/51eec89d4a5c893763311fc6da31b13e.jpg")));label.setBounds(0, 0, 649, 465);getContentPane().add(label);}
}

(25)MainWindowServerF

package com.employee.frame;import java.awt.EventQueue;import javax.swing.JFrame;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.KeyStroke;import com.employee.chart.PlanChartD;import java.awt.FlowLayout;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
import java.awt.Color;public class MainWindowServerF extends JFrame{public MainWindowServerF() {try {setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);setLocationRelativeTo(null);setSize(1168, 588);}catch(Exception e) {e.printStackTrace();}getContentPane().setForeground(Color.WHITE);setForeground(Color.CYAN);getContentPane().setBackground(Color.CYAN);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);JMenuBar menuBar = new JMenuBar();setJMenuBar(menuBar);JMenu menu = new JMenu("人事管理");menu.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/人事管理(1).png")));menu.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu);JMenuItem mntmf = new JMenuItem("员工信息档案(Alt+F)");mntmf.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/档案.png")));mntmf.setMnemonic(KeyEvent.VK_F);mntmf.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new EmployeeInfoF().setVisible(true);}});menu.add(mntmf);JMenuItem mntma = new JMenuItem("所有员工(Alt+A)");mntma.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/所有人员.png")));mntma.setMnemonic(KeyEvent.VK_A);mntma.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new  AllEmployee().setVisible(true);}});menu.add(mntma);JMenu menu_1 = new JMenu("组织架构");menu_1.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/组织架构(1).png")));menu_1.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu_1);JMenuItem mntmalt = new JMenuItem("部门管理(ALt+D)");mntmalt.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/部门.png")));mntmalt.setMnemonic(KeyEvent.VK_D);mntmalt.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new  DivianageF().setVisible(true);}});menu_1.add(mntmalt);JMenuItem mntmaltp = new JMenuItem("职务及岗位管理(Alt+P)");mntmaltp.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/岗位管理.png")));mntmaltp.setMnemonic(KeyEvent.VK_P);mntmaltp.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new DutyManagementF().setVisible(true);}});menu_1.add(mntmaltp);JMenu menu_3 = new JMenu("薪酬管理");menu_3.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/薪酬调整.png")));menu_3.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu_3);JMenu menu_13 = new JMenu("工资管理");menu_13.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/工资.png")));menu_3.add(menu_13);JMenuItem menuItem_2 = new JMenuItem("工资发放");menuItem_2.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new SalaryCount().setVisible(true);}});menu_13.add(menuItem_2);JMenuItem menuItem_5 = new JMenuItem("薪酬记录");menu_13.add(menuItem_5);menuItem_5.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new  RemunerationManageF().setVisible(true);}});JMenuItem menuItem_17 = new JMenuItem("数据分析");menuItem_17.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/数据分析.png")));menu_3.add(menuItem_17);JMenu menu_6 = new JMenu("考勤管理");menu_6.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/考勤管理.png")));menu_6.addMouseListener(new MouseAdapter() {@Overridepublic void mousePressed(MouseEvent e) {new  AttendanceManage().setVisible(true);}});menu_6.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu_6);JMenu menu_8 = new JMenu("招聘管理");menu_8.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/招聘.png")));menu_8.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu_8);JMenuItem menuItem_1 = new JMenuItem("考试系统");menuItem_1.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/考试.png")));menuItem_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new TestSystemD().setVisible(true);		}});menu_8.add(menuItem_1);JMenu menu_2 = new JMenu("招聘中心");menu_2.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/招聘计划.png")));menu_8.add(menu_2);JMenu menu_11 = new JMenu("招聘计划");menu_11.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/招聘计划.png")));menu_2.add(menu_11);JMenuItem menuItem_6 = new JMenuItem("招聘计划设立");menuItem_6.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/建立群组.png")));menuItem_6.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new  DutyDesignD().setVisible(true);}});menu_11.add(menuItem_6);JMenuItem menuItem_9 = new JMenuItem("招聘计划明细");menuItem_9.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new AllPlanD().setVisible(true);}});menu_11.add(menuItem_9);JMenuItem menuItem_10 = new JMenuItem("数据分析");menuItem_10.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new PlanChartD().setVisible(true);}});menu_11.add(menuItem_10);JMenuItem menuItem_7 = new JMenuItem("查看简历");menuItem_7.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/简历.png")));menuItem_7.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new EmployeeInfoFShow().setVisible(true);}});menu_2.add(menuItem_7);JMenu menu_12 = new JMenu("系统设置");menu_12.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/系统设置.png")));menu_12.setFont(new Font("Dialog", Font.BOLD, 15));menuBar.add(menu_12);JMenuItem mntmNewMenuItem = new JMenuItem("退出系统");mntmNewMenuItem.setIcon(new ImageIcon(MainWindowServerF.class.getResource("/icons/退出(1).png")));mntmNewMenuItem.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {System.exit(0);}});menu_12.add(mntmNewMenuItem);getContentPane().setLayout(null);}}

(26)OutPaperD

package com.employee.frame;
/*** 出题对话框*/
import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import com.employee.implement.AllActionListener;import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JRadioButton;
import javax.swing.ButtonGroup;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;
import java.awt.Color;public class OutPaperD extends JDialog {public static JTextArea topicField;public static JTextArea aField;public static JTextArea bField;public static JTextArea cField;public static JTextArea dField;public static JRadioButton rdA;public static JRadioButton rdB;public static JRadioButton rdC;public static JRadioButton rdD;public static JButton saveBtn ;public static  final ButtonGroup buttonGroup = new ButtonGroup();public OutPaperD() {setResizable(false);try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(600,700);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JLabel label = new JLabel("请输入试题");label.setForeground(Color.MAGENTA);label.setFont(new Font("Dialog", Font.BOLD, 25));label.setBounds(214, 12, 183, 60);getContentPane().add(label);JLabel label_1 = new JLabel("请输入题目:");label_1.setFont(new Font("Dialog", Font.BOLD, 16));label_1.setBounds(33, 62, 108, 39);getContentPane().add(label_1);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(81, 113, 430, 89);getContentPane().add(scrollPane);topicField = new JTextArea();scrollPane.setViewportView(topicField);JLabel label_2 = new JLabel("请输入选项:");label_2.setFont(new Font("Dialog", Font.BOLD, 16));label_2.setBounds(33, 203, 108, 35);getContentPane().add(label_2);JLabel lblA = new JLabel("A");lblA.setFont(new Font("Dialog", Font.BOLD, 18));lblA.setBounds(35, 254, 39, 22);getContentPane().add(lblA);JScrollPane scrollPane_1 = new JScrollPane();scrollPane_1.setBounds(81, 245, 430, 49);getContentPane().add(scrollPane_1);aField = new JTextArea();scrollPane_1.setViewportView(aField);JLabel lblB = new JLabel("B");lblB.setFont(new Font("Dialog", Font.BOLD, 18));lblB.setBounds(35, 324, 39, 18);getContentPane().add(lblB);JScrollPane scrollPane_2 = new JScrollPane();scrollPane_2.setBounds(81, 306, 430, 49);getContentPane().add(scrollPane_2);bField = new JTextArea();scrollPane_2.setViewportView(bField);JLabel lblC = new JLabel("C");lblC.setFont(new Font("Dialog", Font.BOLD, 18));lblC.setBounds(35, 394, 39, 18);getContentPane().add(lblC);JScrollPane scrollPane_3 = new JScrollPane();scrollPane_3.setBounds(81, 379, 430, 49);getContentPane().add(scrollPane_3);cField = new JTextArea();scrollPane_3.setViewportView(cField);JLabel lblD = new JLabel("D");lblD.setFont(new Font("Dialog", Font.BOLD, 18));lblD.setBounds(35, 461, 39, 22);getContentPane().add(lblD);JScrollPane scrollPane_4 = new JScrollPane();scrollPane_4.setBounds(81, 450, 430, 49);getContentPane().add(scrollPane_4);dField = new JTextArea();scrollPane_4.setViewportView(dField);saveBtn = new JButton("保存");saveBtn.setIcon(new ImageIcon(OutPaperD.class.getResource("/icons/保存(1).png")));saveBtn.addActionListener(new AllActionListener());saveBtn.setBounds(35, 574, 105, 28);getContentPane().add(saveBtn);JButton clearBtn = new JButton("重置");clearBtn.setIcon(new ImageIcon(OutPaperD.class.getResource("/icons/重置.png")));clearBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {topicField.setText("");aField.setText("");bField.setText("");cField.setText("");dField.setText("");}});clearBtn.setBounds(406, 574, 105, 28);getContentPane().add(clearBtn);JLabel label_3 = new JLabel("答案");label_3.setFont(new Font("Dialog", Font.BOLD, 15));label_3.setBounds(35, 520, 59, 18);getContentPane().add(label_3);rdA = new JRadioButton("A");buttonGroup.add(rdA);rdA.setFont(new Font("Dialog", Font.BOLD, 14));rdA.setBounds(93, 516, 48, 26);getContentPane().add(rdA);rdB = new JRadioButton("B");buttonGroup.add(rdB);rdB.setFont(new Font("Dialog", Font.BOLD, 14));rdB.setBounds(215, 516, 53, 26);getContentPane().add(rdB);rdC = new JRadioButton("C");buttonGroup.add(rdC);rdC.setFont(new Font("Dialog", Font.BOLD, 14));rdC.setBounds(338, 516, 59, 26);getContentPane().add(rdC);rdD = new JRadioButton("D");buttonGroup.add(rdD);rdD.setFont(new Font("Dialog", Font.BOLD, 14));rdD.setBounds(452, 516, 59, 26);getContentPane().add(rdD);JLabel label_4 = new JLabel(" ");label_4.setIcon(new ImageIcon(OutPaperD.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_4.setBounds(0, 0, 600, 670);getContentPane().add(label_4);}
}

(27)PaperBankD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;import com.employee.dao.Dao;
import com.employee.implement.AllActionListener;
import com.employee.model.Paper;import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Font;
import java.awt.Color;public class PaperBankD extends JDialog {public static JTable table;public static  JTextField idField;public static JButton deleteBtn;public PaperBankD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize( 1100, 700);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JPanel panel = new JPanel();panel.setBounds(0, 0, 1109, 128);getContentPane().add(panel);panel.setLayout(null);deleteBtn = new JButton("删除试题");deleteBtn.setIcon(new ImageIcon(PaperBankD.class.getResource("/icons/删除.png")));deleteBtn.addActionListener(new  AllActionListener());deleteBtn.setBounds(807, 91, 102, 23);panel.add(deleteBtn);idField = new JTextField();idField.setBounds(630, 91, 165, 22);panel.add(idField);idField.setColumns(10);JLabel label = new JLabel("试题编号:");label.setForeground(Color.BLUE);label.setFont(new Font("Dialog", Font.BOLD, 18));label.setBounds(547, 91, 90, 20);panel.add(label);JLabel label_1 = new JLabel(" ");label_1.setIcon(new ImageIcon(PaperBankD.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_1.setBounds(12, -14, 1091, 167);panel.add(label_1);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(25, 138, 1070, 387);getContentPane().add(scrollPane);table = new JTable();table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u7F16\u53F7", "\u9898\u76EE", "\u9009\u9879A", "\u9009\u9879B", "\u9009\u9879C", "\u9009\u9879D", "\u7B54\u6848"}) {boolean[] columnEditables = new boolean[] {false, true, false, false, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});String sql="select * from paper";try {PaperBankD .displayTable(Dao.allData(sql));//填充表格} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);}public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) PaperBankD .table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt(1));v.add(rs.getString(2));v.add(rs.getString(3));v.add(rs.getString(4));v.add(rs.getString(5));v.add(rs.getString(6));v.add(rs.getString(7));det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}
}

(28)RegisterF

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;import com.employee.implement.AllActionListener;import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JPasswordField;
import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;public class RegisterF extends JDialog {public static JTextField accountField;public static JTextField phoneField;public static JPasswordField passwordField;public static JButton btnOk;public RegisterF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setVisible(true);setSize( 581, 420);setResizable(false);setLocationRelativeTo(null);setModal(false);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JLabel lblAccount = new JLabel("Account:");lblAccount.setForeground(Color.YELLOW);lblAccount.setFont(new Font("Dialog", Font.BOLD, 14));lblAccount.setBounds(136, 136, 72, 18);getContentPane().add(lblAccount);JLabel lblPhone = new JLabel("Phone:");lblPhone.setForeground(Color.YELLOW);lblPhone.setFont(new Font("Dialog", Font.BOLD, 14));lblPhone.setBounds(136, 178, 59, 18);getContentPane().add(lblPhone);JLabel lblPassword = new JLabel("Password:");lblPassword.setForeground(Color.YELLOW);lblPassword.setFont(new Font("Dialog", Font.BOLD, 14));lblPassword.setBounds(136, 222, 72, 21);getContentPane().add(lblPassword);accountField = new JTextField();accountField.setBounds(218, 136, 235, 22);getContentPane().add(accountField);accountField.setColumns(10);phoneField = new JTextField();phoneField.setBounds(218, 178, 235, 22);getContentPane().add(phoneField);phoneField.setColumns(10);passwordField = new JPasswordField();passwordField.setBounds(218, 223, 235, 22);getContentPane().add(passwordField);btnOk = new JButton("OK");btnOk.addActionListener(new AllActionListener());btnOk.setIcon(new ImageIcon(RegisterF.class.getResource("/icons/ok.png")));btnOk.setBounds(136, 288, 105, 28);getContentPane().add(btnOk);JButton btnReturn = new JButton("Return");btnReturn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {dispose();}});btnReturn.setIcon(new ImageIcon(RegisterF.class.getResource("/icons/取消.png")));btnReturn.setBounds(348, 288, 105, 28);getContentPane().add(btnReturn);JLabel lblPleaseInputYour = new JLabel("Please input your information");lblPleaseInputYour.setForeground(Color.RED);lblPleaseInputYour.setFont(new Font("Dialog", Font.BOLD, 20));lblPleaseInputYour.setBounds(136, 45, 317, 37);getContentPane().add(lblPleaseInputYour);JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(RegisterF.class.getResource("/images/a6.jpg")));label.setBounds(0, 0, 569, 409);getContentPane().add(label);}}

(29)RemunerationManageF

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Vector;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;import com.employee.dao.Dao;import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.border.TitledBorder;
import java.awt.Color;public class RemunerationManageF extends JDialog {private static JTable table;private JTextField textField;public RemunerationManageF() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(1200, 700);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setTitle("薪酬记录");getContentPane().setLayout(null);{JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(26, 164, 912, 390);getContentPane().add(scrollPane);{table = new JTable();table.setModel(new DefaultTableModel(new Object[][] {},new String[] {"\u5DE5\u53F7", "\u59D3\u540D", "\u6027\u522B", "\u5E74\u9F84", "\u5C97\u4F4D\u5DE5\u8D44", "\u7EA7\u522B\u5DE5\u8D44", "\u5B66\u5386\u6D25\u8D34", "\u6263\u6B3E", "\u5176\u4ED6\u5956\u91D1", "\u7EE9\u6548\u5956"}) {boolean[] columnEditables = new boolean[] {true, true, true, false, true, true, true, false, false, false};public boolean isCellEditable(int row, int column) {return columnEditables[column];}});/*** 填充表格*/String sql="select * from addMoneyData";try {displayTable(Dao.allData(sql)) ;} catch (SQLException e) {e.printStackTrace();}scrollPane.setViewportView(table);}}{JPanel panel = new JPanel();panel.setBorder(new TitledBorder(null, "\u67E5\u8BE2\u7ED3\u679C", TitledBorder.LEADING, TitledBorder.TOP, null, Color.RED));panel.setBounds(950, 164, 232, 390);getContentPane().add(panel);}{JLabel label = new JLabel("工号");label.setBounds(633, 132, 46, 18);getContentPane().add(label);}{textField = new JTextField();textField.setBounds(683, 130, 138, 22);getContentPane().add(textField);textField.setColumns(10);}{JButton button = new JButton("查询");button.setBounds(833, 130, 105, 22);getContentPane().add(button);}}/*** 填充薪酬记录表单* @param rs*/public static void displayTable(ResultSet rs) {DefaultTableModel det=(DefaultTableModel) RemunerationManageF.table.getModel();det.setRowCount(0);try {while(rs.next()) {Vector  v=new Vector();v.add(rs.getInt(1));v.add(rs.getString(2));v.add(rs.getString(3));v.add(rs.getInt(4));v.add(rs.getFloat(5)+"¥");v.add(rs.getFloat(6)+"¥");v.add(rs.getFloat(7)+"¥");v.add(rs.getFloat(8)+"¥");v.add(rs.getFloat(9)+"¥");v.add(rs.getFloat(10)+"¥");det.addRow(v);}} catch (SQLException e) {e.printStackTrace();}}}

(30)SalaryCount

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.awt.Font;
import javax.swing.JCheckBox;
import javax.swing.border.TitledBorder;import com.employee.implement.AllActionListener;import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.ImageIcon;public class SalaryCount extends JDialog {public static JTextField jobNumField;public static JTextField nameField;public static JTextField salaryField;public static JTextField effectField;public static JTextField addField;public static JTextField creditCardField;public static JTextField dateField;public static JTextField outMoneyField;public static JTextField delField;public static JTextField dutyField;public static JTextField gradeField;public static JTextField cultureField;public static JButton provideBtn;public static JButton searchBtn;public static JCheckBox checkBtn;public static JLabel num;public static JLabel name;public static JLabel pro;public static JLabel check;public static JLabel culture;private JLabel label_14;public SalaryCount() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(863, 609);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setResizable(false);setTitle("工资发放系统");getContentPane().setLayout(null);JLabel label = new JLabel("工号");label.setBounds(52, 83, 59, 18);getContentPane().add(label);JLabel label_1 = new JLabel("姓名");label_1.setBounds(52, 173, 48, 18);getContentPane().add(label_1);JLabel label_2 = new JLabel("月薪");label_2.setBounds(52, 221, 40, 18);getContentPane().add(label_2);JLabel label_3 = new JLabel("绩效奖");label_3.setBounds(342, 83, 59, 18);getContentPane().add(label_3);JLabel label_4 = new JLabel("考勤补贴");label_4.setBounds(342, 127, 59, 18);getContentPane().add(label_4);jobNumField = new JTextField();jobNumField.setBounds(91, 81, 114, 22);getContentPane().add(jobNumField);jobNumField.setColumns(10);nameField = new JTextField();nameField.setBounds(91, 171, 114, 22);getContentPane().add(nameField);nameField.setColumns(10);salaryField = new JTextField();salaryField.setText("0");salaryField.setBounds(91, 219, 114, 22);getContentPane().add(salaryField);salaryField.setColumns(10);effectField = new JTextField();effectField.setText("0");effectField.setBounds(409, 81, 97, 22);getContentPane().add(effectField);effectField.setColumns(10);addField = new JTextField();addField.setText("0");addField.setBounds(409, 125, 97, 22);getContentPane().add(addField);addField.setColumns(10);provideBtn = new JButton("发放");provideBtn.setIcon(new ImageIcon(SalaryCount.class.getResource("/icons/ok.png")));provideBtn.addActionListener(new AllActionListener());provideBtn.setBounds(409, 521, 105, 28);getContentPane().add(provideBtn);JLabel label_5 = new JLabel("银行卡号");label_5.setBounds(52, 324, 59, 18);getContentPane().add(label_5);creditCardField = new JTextField();creditCardField.setBounds(112, 322, 303, 22);getContentPane().add(creditCardField);creditCardField.setColumns(10);JLabel label_6 = new JLabel("日期");label_6.setBounds(52, 378, 48, 18);getContentPane().add(label_6);dateField = new JTextField();dateField.setText("0000-00-00");dateField.setBounds(111, 376, 221, 22);getContentPane().add(dateField);dateField.setColumns(10);JLabel label_7 = new JLabel("拨款人");label_7.setBounds(52, 430, 59, 18);getContentPane().add(label_7);outMoneyField = new JTextField();outMoneyField.setBounds(111, 428, 153, 22);getContentPane().add(outMoneyField);outMoneyField.setColumns(10);JLabel label_8 = new JLabel("工资发放系统");label_8.setFont(new Font("Dialog", Font.PLAIN, 20));label_8.setBounds(211, 12, 121, 37);getContentPane().add(label_8);JLabel label_9 = new JLabel("考勤扣款");label_9.setBounds(342, 173, 59, 18);getContentPane().add(label_9);delField = new JTextField();delField.setText("0");delField.setBounds(409, 171, 97, 22);getContentPane().add(delField);delField.setColumns(10);searchBtn = new JButton("查询");searchBtn.setIcon(new ImageIcon(SalaryCount.class.getResource("/icons/查找.png")));searchBtn.addActionListener(new AllActionListener());searchBtn.setBounds(217, 81, 80, 20);getContentPane().add(searchBtn);JLabel label_10 = new JLabel("岗位");label_10.setBounds(52, 127, 48, 18);getContentPane().add(label_10);dutyField = new JTextField();dutyField.setBounds(91, 125, 114, 22);getContentPane().add(dutyField);dutyField.setColumns(10);JLabel label_11 = new JLabel("级别工资");label_11.setBounds(52, 274, 59, 18);getContentPane().add(label_11);gradeField = new JTextField();gradeField.setText("0");gradeField.setBounds(112, 272, 94, 22);getContentPane().add(gradeField);gradeField.setColumns(10);JLabel label_12 = new JLabel("学历津贴");label_12.setBounds(342, 221, 59, 18);getContentPane().add(label_12);cultureField = new JTextField();cultureField.setText("0");cultureField.setBounds(409, 219, 97, 22);getContentPane().add(cultureField);cultureField.setColumns(10);checkBtn = new JCheckBox("你已同意相关协议");checkBtn.setBounds(52, 462, 131, 26);getContentPane().add(checkBtn);JLabel label_13 = new JLabel("阅读");label_13.setFont(new Font("Dialog", Font.ITALIC, 12));label_13.setBounds(191, 466, 48, 18);getContentPane().add(label_13);JPanel panel = new JPanel();panel.setBorder(new TitledBorder(null, "\u5DE5\u8D44\u53D1\u653E\u76F8\u5173\u4FE1\u606F", TitledBorder.LEADING, TitledBorder.TOP, null, Color.RED));panel.setBounds(535, 39, 316, 449);getContentPane().add(panel);panel.setLayout(null);num = new JLabel(" ");num.setBounds(39, 54, 215, 18);panel.add(num);name = new JLabel(" ");name.setBounds(39, 94, 215, 18);panel.add(name);pro = new JLabel(" ");pro.setBounds(39, 148, 215, 18);panel.add(pro);check = new JLabel(" ");check.setBounds(39, 194, 215, 18);panel.add(check);culture = new JLabel("");culture.setBounds(39, 247, 215, 18);panel.add(culture);JButton button_2 = new JButton("清空");button_2.setIcon(new ImageIcon(SalaryCount.class.getResource("/icons/重置.png")));button_2.setBounds(57, 521, 105, 28);getContentPane().add(button_2);label_14 = new JLabel(" ");label_14.setIcon(new ImageIcon(SalaryCount.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_14.setBounds(0, -40, 863, 670);getContentPane().add(label_14);}
}

(31)testPaper

package com.employee.frame;import javax.swing.JDialog;
import javax.swing.JPanel;import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JRadioButton;
import java.awt.Font;
import javax.swing.border.TitledBorder;import java.util.*;import com.employee.dao.Dao;
import com.employee.implement.AllActionListener;
import com.employee.kit.StringUtils;
import com.employee.model.Employee;
import com.employee.model.Grade;
import com.employee.model.Paper;
import com.employee.model.SetPaper;
import com.employee.operate.PaperTest;import java.awt.Color;
import java.awt.Button;
import javax.swing.ButtonGroup;
import java.awt.event.ActionListener;import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.awt.event.ActionEvent;
import javax.swing.JButton;
import javax.swing.ImageIcon;public class testPaper extends JDialog {public static  final ButtonGroup buttonGroup = new ButtonGroup();private int paperNums=0;private int paperTimes=0;public static JTextArea topicField;public static JTextArea aField;public static JTextArea bField;public static JTextArea cField;public static JTextArea dField;private JLabel i;private  int index=1;//初始化考题从一开始private Paper p=new Paper();public  static JButton bBtn;public  static JButton fBtn;public static JButton submitBtn;public static JRadioButton rdbtnA;public static JRadioButton rdbtnB;public static JRadioButton rdbtnC;public static JRadioButton rdbtnD;public static JButton button;private JLabel leave;public static String name;private int score=1;public testPaper() {/*** 获取题目配置*/SetPaper sp=new SetPaper();String sql="select * from setPaper where id=?";sp.setId(1);try {ResultSet rs=Dao.searchSet(sp, sql);while(rs.next()) {paperNums=rs.getInt("paperNum");//题目数量paperTimes=rs.getInt("paperTime");//考试时间}} catch (SQLException e1) {e1.printStackTrace();}/*** 初始化考题*/try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(985, 741);setLocationRelativeTo(null);setResizable(false);setModal(true);} catch (Exception e) {e.printStackTrace();}getContentPane().setLayout(null);JLabel label = new JLabel("题目");label.setBounds(61, 70, 59, 18);getContentPane().add(label);JLabel lblA = new JLabel("A");lblA.setBounds(61, 259, 25, 18);getContentPane().add(lblA);JLabel lblB = new JLabel("B");lblB.setBounds(61, 361, 25, 18);getContentPane().add(lblB);JLabel lblC = new JLabel("C");lblC.setBounds(61, 438, 25, 18);getContentPane().add(lblC);JLabel lblD = new JLabel("D");lblD.setBounds(62, 518, 25, 18);getContentPane().add(lblD);JScrollPane scrollsqlPane_1 = new JScrollPane();JLabel label_1 = new JLabel("答案:");label_1.setBounds(27, 580, 59, 18);getContentPane().add(label_1);rdbtnA = new JRadioButton("A");buttonGroup.add(rdbtnA);rdbtnA.setBounds(82, 576, 59, 26);getContentPane().add(rdbtnA);rdbtnB = new JRadioButton("B");buttonGroup.add(rdbtnB);rdbtnB.setBounds(214, 576, 59, 26);getContentPane().add(rdbtnB);rdbtnC = new JRadioButton("C");buttonGroup.add(rdbtnC);rdbtnC.setBounds(360, 576, 59, 26);getContentPane().add(rdbtnC);rdbtnD = new JRadioButton("D");buttonGroup.add(rdbtnD);rdbtnD.setBounds(488, 576, 59, 26);getContentPane().add(rdbtnD);JLabel label_2 = new JLabel("第");label_2.setFont(new Font("Dialog", Font.BOLD, 18));label_2.setBounds(214, 12, 59, 18);getContentPane().add(label_2);i = new JLabel(" ");i.setForeground(Color.RED);i.setFont(new Font("Dialog", Font.BOLD, 18));i.setBounds(277, 12, 59, 18);getContentPane().add(i);JLabel label_3 = new JLabel("题");label_3.setFont(new Font("Dialog", Font.BOLD, 18));label_3.setBounds(360, 12, 59, 18);getContentPane().add(label_3);JPanel panel = new JPanel();panel.setBorder(new TitledBorder(null, "\u4FE1\u606F\u680F", TitledBorder.LEADING, TitledBorder.TOP, null, Color.RED));panel.setBounds(592, 78, 305, 480);getContentPane().add(panel);panel.setLayout(null);JLabel label_4 = new JLabel("题目总数:");label_4.setFont(new Font("Dialog", Font.BOLD, 18));label_4.setBounds(48, 123, 90, 27);panel.add(label_4);JLabel count = new JLabel("0");count.setForeground(Color.BLUE);count.setFont(new Font("Dialog", Font.BOLD, 18));count.setText(String.valueOf(paperNums));//题目总数count.setBounds(146, 130, 65, 18);panel.add(count);JLabel label_5 = new JLabel("剩余题数:");label_5.setFont(new Font("Dialog", Font.BOLD, 18));label_5.setBounds(48, 169, 90, 35);panel.add(label_5);leave = new JLabel("0");leave.setForeground(Color.GREEN);leave.setFont(new Font("Dialog", Font.BOLD, 18));leave.setText(String.valueOf(paperNums-index));//剩余题目数leave.setBounds(150, 180, 61, 18);panel.add(leave);JLabel label_7 = new JLabel("考试时间:");label_7.setFont(new Font("Dialog", Font.BOLD, 18));label_7.setBounds(48, 229, 90, 22);panel.add(label_7);JLabel tm = new JLabel("0");tm.setForeground(Color.RED);tm.setFont(new Font("Dialog", Font.BOLD, 18));tm.setText(String.valueOf(paperTimes+"分钟"));//考试时间tm.setBounds(150, 234, 59, 18);panel.add(tm);JLabel label_9 = new JLabel("企业员工招聘考试");label_9.setBounds(67, 24, 160, 30);panel.add(label_9);label_9.setFont(new Font("Dialog", Font.BOLD, 20));JLabel label_10 = new JLabel("1.");label_10.setFont(new Font("Dialog", Font.BOLD, 20));label_10.setBounds(7, 130, 29, 18);panel.add(label_10);JLabel label_11 = new JLabel("2.");label_11.setFont(new Font("Dialog", Font.BOLD, 20));label_11.setBounds(7, 180, 29, 18);panel.add(label_11);JLabel label_12 = new JLabel("3.");label_12.setFont(new Font("Dialog", Font.BOLD, 20));label_12.setBounds(7, 234, 29, 18);panel.add(label_12);JLabel label_6 = new JLabel("4.");label_6.setFont(new Font("Dialog", Font.BOLD, 20));label_6.setBounds(7, 290, 29, 18);panel.add(label_6);JLabel label_8 = new JLabel("剩余时间:");label_8.setFont(new Font("Dialog", Font.BOLD, 18));label_8.setBounds(48, 290, 90, 22);panel.add(label_8);JLabel lt = new JLabel("0");lt.setBounds(146, 294, 59, 18);panel.add(lt);button = new JButton("开始考试");button.setIcon(new ImageIcon(testPaper.class.getResource("/icons/ok.png")));button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {name=JOptionPane.showInputDialog("请输入你的姓名");if(StringUtils.isNotEmpty(name)) {fBtn.setEnabled(true);bBtn.setEnabled(true);submitBtn.setEnabled(true);i.setText(String.valueOf(index));//题目位置p.setId(index);PaperTest.fillPaper(p);}}});button.setBounds(101, 440, 105, 28);panel.add(button);fBtn = new JButton("  ");fBtn.setIcon(new ImageIcon(testPaper.class.getResource("/icons/右.png")));fBtn.setEnabled(false);fBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {String sql="select * from paper ";String value="";index++;leave.setText(String.valueOf(paperNums-index));//剩余题目数i.setText(String.valueOf(index));//题目位置if( index>paperNums) {JOptionPane.showMessageDialog(null, "你已经做完全部的题目!");}p.setId(index);PaperTest.fillPaper(p);try {ResultSet rs = Dao.allData(sql);while(rs.next()) {if(testPaper.rdbtnA.isSelected()) {value="A";}else if(testPaper.rdbtnB.isSelected()) {value="B";}else if(testPaper.rdbtnC.isSelected()) {value="C";}else if(testPaper.rdbtnD.isSelected()) {value="D";}if(rs.getString("answer").equals(value)) {++score;}}} catch (SQLException e) {e.printStackTrace();}}});fBtn.setFont(new Font("Dialog", Font.PLAIN, 18));fBtn.setBounds(299, 632, 81, 26);getContentPane().add(fBtn);bBtn = new JButton(" ");bBtn.setIcon(new ImageIcon(testPaper.class.getResource("/icons/左.png")));bBtn.setEnabled(false);bBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {String sql="select * from paper ";String value="";leave.setText(String.valueOf(paperNums-index));//剩余题目数i.setText(String.valueOf(index));//题目位置index--;if( index<=0) {index=1;}p.setId(index);PaperTest.fillPaper(p);try {ResultSet rs = Dao.allData(sql);while(rs.next()) {if(testPaper.rdbtnA.isSelected()) {value="A";}else if(testPaper.rdbtnB.isSelected()) {value="B";}else if(testPaper.rdbtnC.isSelected()) {value="C";}else if(testPaper.rdbtnD.isSelected()) {value="D";}if(rs.getString("answer").equals(value)) {++score;}}} catch (SQLException e) {e.printStackTrace();}}});bBtn.setFont(new Font("Dialog", Font.PLAIN, 18));bBtn.setBounds(175, 632, 81, 26);getContentPane().add(bBtn);JLabel label_13 = new JLabel("当前时间:");label_13.setBounds(733, 15, 67, 18);getContentPane().add(label_13);SimpleDateFormat sdf=new SimpleDateFormat("HH:mm:ss");JLabel lblNewLabel_1 = new JLabel("00:00");//当前系统lblNewLabel_1.setBounds(812, 15, 114, 18);getContentPane().add(lblNewLabel_1);JScrollPane scrollPane = new JScrollPane();scrollPane.setBounds(98, 87, 472, 100);getContentPane().add(scrollPane);topicField = new JTextArea();scrollPane.setViewportView(topicField);JScrollPane scrollPane_1 = new JScrollPane();scrollPane_1.setBounds(98, 233, 472, 64);getContentPane().add(scrollPane_1);aField = new JTextArea();scrollPane_1.setViewportView(aField);JScrollPane scrollPane_2 = new JScrollPane();scrollPane_2.setBounds(98, 338, 472, 64);getContentPane().add(scrollPane_2);bField = new JTextArea();scrollPane_2.setViewportView(bField);JScrollPane scrollPane_3 = new JScrollPane();scrollPane_3.setBounds(98, 414, 471, 64);getContentPane().add(scrollPane_3);cField = new JTextArea();scrollPane_3.setViewportView(cField);JScrollPane scrollPane_4 = new JScrollPane();scrollPane_4.setBounds(97, 506, 472, 48);getContentPane().add(scrollPane_4);dField = new JTextArea();scrollPane_4.setViewportView(dField);submitBtn = new JButton("交卷");submitBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {String sql1="insert into grades (score,name) values(?,?)";try {Grade g=new Grade();g.setScore(score);g.setName( testPaper.name);if(Dao.saveScore(g, sql1)==1) {JOptionPane.showMessageDialog(null, "成绩上传成功!");JOptionPane.showMessageDialog(null, "你的成绩为:"+score+"分");testPaper.submitBtn.setEnabled(false);testPaper.fBtn.setEnabled(false);testPaper.bBtn.setEnabled(false);testPaper.button.setEnabled(false);}else {JOptionPane.showMessageDialog(null, "成绩上传失败!");}} catch (SQLException e) {e.printStackTrace();}}});submitBtn.setIcon(new ImageIcon(testPaper.class.getResource("/icons/ok.png")));submitBtn.setEnabled(false);submitBtn.setBounds(488, 634, 82, 28);getContentPane().add(submitBtn);JLabel label_14 = new JLabel(" ");label_14.setIcon(new ImageIcon(testPaper.class.getResource("/images/2949f1419640bb1c8aa717ccd171c81c.jpg")));label_14.setBounds(0, 0, 1013, 699);getContentPane().add(label_14);}
}

(32)TestSystemD

package com.employee.frame;import java.awt.BorderLayout;
import java.awt.FlowLayout;import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.border.LineBorder;
import java.awt.Color;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JLabel;
import javax.swing.ImageIcon;public class TestSystemD extends JDialog {public TestSystemD() {try {setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);setSize(861, 544);setLocationRelativeTo(null);setModal(true);} catch (Exception e) {e.printStackTrace();}setResizable(false);getContentPane().setLayout(null);{JPanel panel = new JPanel();panel.setBorder(new LineBorder(Color.GREEN));panel.setBounds(12, 12, 837, 105);getContentPane().add(panel);panel.setLayout(null);{JButton button = new JButton("出题");button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new OutPaperD().setVisible(true);}});button.setBounds(23, 39, 105, 28);panel.add(button);}JButton button = new JButton("题库");button.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new PaperBankD().setVisible(true);}});button.setBounds(686, 39, 105, 28);panel.add(button);JButton button_1 = new JButton("生成试卷");button_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new BirthPaper().setVisible(true);}});button_1.setBounds(206, 39, 105, 28);panel.add(button_1);JButton button_2 = new JButton("考生成绩");button_2.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new AppGradeD().setVisible(true);}});button_2.setBounds(450, 39, 105, 28);panel.add(button_2);JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(TestSystemD.class.getResource("/images/ff8b9250ae01da21c60136a866fe41c2.jpg")));label.setBounds(0, -12, 837, 117);panel.add(label);}JLabel label = new JLabel(" ");label.setIcon(new ImageIcon(TestSystemD.class.getResource("/images/a5.jpg")));label.setBounds(0, 112, 861, 390);getContentPane().add(label);}
}

(33)WindowMainClientF

package com.employee.frame;import java.awt.EventQueue;import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JTextField;import com.employee.implement.AllActionListener;import javax.swing.JButton;
import javax.swing.ImageIcon;
import java.awt.Color;public class WindowMainClientF {public static JButton writeBtn;private JFrame frame;/*** Launch the application.*/public static void main(String[] args) {EventQueue.invokeLater(new Runnable() {public void run() {try {WindowMainClientF window = new WindowMainClientF();window.frame.setVisible(true);} catch (Exception e) {e.printStackTrace();}}});}/*** Create the application.*/public WindowMainClientF() {initialize();}/*** Initialize the contents of the frame.*/private void initialize() {frame = new JFrame();frame.getContentPane().setBackground(Color.CYAN);frame.setBackground(Color.CYAN);frame.setForeground(Color.CYAN);frame.setBounds(100, 100, 886, 538);frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);JMenuBar menuBar = new JMenuBar();menuBar.setBackground(Color.MAGENTA);frame.setJMenuBar(menuBar);JMenu menu_2 = new JMenu("考试中心");menu_2.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/考勤管理.png")));menuBar.add(menu_2);JMenuItem menuItem_1 = new JMenuItem("考试");menuItem_1.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/考试.png")));menuItem_1.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new testPaper().setVisible(true);}});menu_2.add(menuItem_1);JMenu menu_1 = new JMenu("系统设置");menu_1.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/系统设置.png")));menuBar.add(menu_1);JMenuItem menuItem_4 = new JMenuItem("密码管理");menuItem_4.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/密码管理.png")));menu_1.add(menuItem_4);JMenuItem menuItem_3 = new JMenuItem("推出系统");menuItem_3.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/退出系统(1).png")));menuItem_3.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {System.exit(0);}});menu_1.add(menuItem_3);JPanel panel = new JPanel();panel.setBackground(Color.PINK);frame.getContentPane().add(panel, BorderLayout.WEST);writeBtn = new JButton("填写简历");writeBtn.setIcon(new ImageIcon(WindowMainClientF.class.getResource("/icons/简历.png")));writeBtn.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent arg0) {new EmployeeInfoF2().setVisible(true);}});panel.add(writeBtn);JPanel panel_1 = new JPanel();frame.getContentPane().add(panel_1, BorderLayout.EAST);JPanel panel_2 = new JPanel();frame.getContentPane().add(panel_2, BorderLayout.NORTH);JPanel panel_3 = new JPanel();frame.getContentPane().add(panel_3, BorderLayout.SOUTH);}}

(34)AllActionListener

package com.employee.implement;import java.awt.HeadlessException;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;
import java.sql.SQLException;import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;import com.employee.dao.Dao;
import com.employee.frame.AddDutyDialog;
import com.employee.frame.BirthPaper;
import com.employee.frame.DivianageF;
import com.employee.frame.DutyDesignD;
import com.employee.frame.DutyManagementF;
import com.employee.frame.EmployInfoD;
import com.employee.frame.EmployeeInfoF;
import com.employee.frame.EmployeeInfoF2;
import com.employee.frame.EmployeeInfoFShow;
import com.employee.frame.EstablishDepartmentF;
import com.employee.frame.Login;
import com.employee.frame.MainWindowServerF;
import com.employee.frame.OutPaperD;
import com.employee.frame.PaperBankD;
import com.employee.frame.RegisterF;
import com.employee.frame.SalaryCount;
import com.employee.frame.WindowMainClientF;
import com.employee.frame.testPaper;
import com.employee.kit.ClearTextOfDepart;
import com.employee.kit.StringUtils;
import com.employee.kit.TextClue;
import com.employee.model.Department;
import com.employee.model.Duty;
import com.employee.model.Employee;
import com.employee.model.Grade;
import com.employee.model.Money;
import com.employee.model.Paper;
import com.employee.model.RecruitPlan;
import com.employee.model.SetPaper;
import com.employee.model.User;
import com.employee.operate.EmployeeFile;public class AllActionListener implements ActionListener  {@Overridepublic void actionPerformed(ActionEvent arg0) {/*** 登陆*/if(arg0.getSource()==Login.LoginButton) {if(StringUtils.isEmpty(Login.accountField.getText())) {JOptionPane.showMessageDialog(null, "请输入你的账号");return;}else  if(StringUtils.isEmpty(String.valueOf(Login.passwordField.getPassword()))) {JOptionPane.showMessageDialog(null, "密码不能为空!");return;}else {User user=new User();int account=Integer.parseInt(Login.accountField.getText().trim());String password=String.valueOf((Login.passwordField.getPassword()));user.setAccount(account);user.setPassword(password);try {if(Dao.accountExist(user)) {User u= Dao.checkLogin(user);if(u!=null) {if(u.getAccount()==account&&u.getPassword().equals(password)) {JOptionPane.showMessageDialog(null, "登陆成功");new  MainWindowServerF().setVisible(true);}else {JOptionPane.showMessageDialog(null, "登陆失败");}}}else {JOptionPane.showMessageDialog(null, "你尚未注册!");}} catch (SQLException e) {e.printStackTrace();}}}else if(arg0.getSource()==RegisterF.btnOk) {if(StringUtils.isEmpty(RegisterF.accountField.getText())) {JOptionPane.showMessageDialog(null, "账户不能为空!");return;}else if(StringUtils.isEmpty(RegisterF.phoneField.getText())) {JOptionPane.showMessageDialog(null, "电话不能为空!");return;}else if(StringUtils.isEmpty(RegisterF.passwordField.getPassword().toString())) {JOptionPane.showMessageDialog(null, "密码不能为空!");return;}else {String sql="insert into User values(?,?,?)";User user =new User();user.setAccount(Integer.parseInt(RegisterF.accountField.getText()));user.setPhone(Double.parseDouble(RegisterF.phoneField.getText()));user.setPassword(RegisterF.passwordField.getPassword().toString());try {if(Dao.accountExist(user)) {JOptionPane.showMessageDialog(null, "换一个账号吧,此账号以有人使用!");return;}else {if(Dao.register(user, sql)==1) {JOptionPane.showMessageDialog(null, "注册成功!");}else {JOptionPane.showMessageDialog(null, "注册失败!");}}} catch (Exception e) {e.printStackTrace();}  }}/*** 建立岗位*/else if(arg0.getSource()==AddDutyDialog.button) {String sql="insert into duty values(?,?,?)";String sql1="select * from duty";Duty duty=new Duty();duty.setDutyNum( Integer.parseInt(AddDutyDialog.numField.getText()));duty.setDutyName(AddDutyDialog.dutyField.getText());duty.setDepartment(String.valueOf(AddDutyDialog.comboBox.getSelectedItem()));try {if(Dao. addOrModifyDuty(duty, sql)>0) {JOptionPane.showMessageDialog(null, "建立成功!");DutyManagementF.displayTable(Dao.allData(sql1));//填充表格}else {JOptionPane.showMessageDialog(null, "建立失败!");}} catch (SQLException e) {e.printStackTrace();}}/*** 删除岗位*/if(arg0.getSource()==DutyManagementF.deleteBtn) {String sql="delete from duty where dutyNum=?";String sql1="select * from duty";if(StringUtils .isEmpty(DutyManagementF.numField.getText())) {JOptionPane.showMessageDialog(null, "请输入用户名!");return;}else {if(JOptionPane.showConfirmDialog(null, "确定撤销此岗位!")==0) {Duty duty=new Duty();duty.setDutyNum(Integer.parseInt(DutyManagementF .numField.getText()));try {if(Dao.deleteDuty(duty, sql)==1) {JOptionPane.showMessageDialog(null, "撤销成功!");DutyManagementF.displayTable(Dao.allData(sql1));//填充表格}else {JOptionPane.showMessageDialog(null, "撤销失败!");}} catch (SQLException e) {e.printStackTrace();}}}}/*** 修改岗位*/else if(arg0.getSource()==DutyManagementF.modifyBtn) {String sql="update   duty set  DutyName=?,department=?  where dutyNum=?";String sql1="select * from duty";if(StringUtils .isEmpty(DutyManagementF.numField.getText())) {JOptionPane.showMessageDialog(null, "岗位号不能为空!");}else {if(JOptionPane.showConfirmDialog(null, "确定要修改")==0) {Duty duty=new Duty();duty.setDutyName(DutyManagementF.dutyField.getText());duty.setDepartment(String.valueOf(DutyManagementF.comboBox.getSelectedItem()));duty.setDutyNum(Integer.parseInt(DutyManagementF.numField.getText()));try {if(Dao.modifyDuty(duty, sql)>0) {JOptionPane.showMessageDialog(null, "修改成功!");DutyManagementF.displayTable(Dao.allData(sql1));//刷新表格}else {JOptionPane.showMessageDialog(null, "修改失败!");}} catch (SQLException e) {e.printStackTrace();}}}}/*** 建立部门*/else if(arg0.getSource()==EstablishDepartmentF.addBtn) {String sql="insert into   department(name,establishPerson,nameMark) values(?,?,?)";String sql2="select * from department";StringUtils u=new StringUtils();if( TextClue.showEstablishDialog()) {try {Department dep=new Department();dep.setNameMark(Integer.parseInt(EstablishDepartmentF.nameMarkField.getText()));dep.setName(EstablishDepartmentF.nameField.getText());dep.setEstablishPerson(EstablishDepartmentF.namePersonField.getText());if(Dao.estabOrModifyDepartment(dep,sql)>0) {JOptionPane.showMessageDialog(null, "添加成功");ClearTextOfDepart.clearEstablishText();DivianageF.displayTable(Dao.allData (sql2));}else {JOptionPane.showMessageDialog(null, "添加失败!");}} catch ( Exception e) {e.printStackTrace();}  }}/*** 删除部门*/else if(arg0.getSource()== DivianageF.deleteDepart) {String sql="insert into departmentHistory(name,namePerson,nameMark) values(?,?,?)";String sql2="select * from department";String sql3="select * from department where  nameMark=?";//查找StringUtils str=new StringUtils();if(str.isEmpty(DivianageF.nameMarkField.getText())) {JOptionPane.showMessageDialog(null, "部门代号不能为空!");}else {if(JOptionPane.showConfirmDialog(null, "确定撤销!")==0) {try {Department  dep=new Department();dep.setNameMark(Integer.parseInt(DivianageF.nameMarkField.getText()));dep.setName(DivianageF.nameField.getText());dep.setEstablishPerson(DivianageF.namePersonField.getText());if(Dao.isExist(dep, sql3)) {Dao.estabOrModifyDepartment(dep, sql);//写进历史纪录if( Dao.deleteDepartment(dep)==1) {JOptionPane.showMessageDialog(null, "撤销成功!");DivianageF.displayTable(Dao.allData (sql2));ClearTextOfDepart.clearDepartText();}else {JOptionPane.showMessageDialog(null, "撤销失败 !");}}} catch (SQLException e) {e.printStackTrace();}}}}/*** 修改部门*/else if(arg0.getSource()==DivianageF.modifyBtn) {String sql2="select * from department";String sql3="update department set name=?,establishPerson=? where nameMark=?";if(JOptionPane.showConfirmDialog(null, "确定修改!")==0) {if(TextClue.showDepartDialog()) {try {Department dep=new Department();dep.setNameMark(Integer.parseInt(DivianageF.nameMarkField.getText()));dep.setName(DivianageF.nameField.getText());dep.setEstablishPerson(DivianageF.namePersonField.getText());if(Dao.estabOrModifyDepartment(dep,sql3)>0) {JOptionPane.showMessageDialog(null, "修改成功!");DivianageF.displayTable(Dao.allData (sql2));}else {JOptionPane.showMessageDialog(null, "修改失败!");}} catch (SQLException e) {e.printStackTrace();}}}}/*** 查找部门*/else if(arg0.getSource()==DivianageF.searchBtn) {String sql="select * from duty where dutyNum=?";if(StringUtils.isEmpty(String.valueOf(DutyManagementF.searchField))) {JOptionPane.showMessageDialog(null, "岗位代号不能为空!");return ;}else {Duty duty =new Duty();duty.setDutyNum(Integer.parseInt(DutyManagementF.searchField.getText()));try {ResultSet rs=Dao.searchDuty(duty, sql);while(rs.next()) {DutyManagementF.labelNum.setText("岗位代号:"+rs.getInt("dutyNum"));DutyManagementF.labelName.setText("岗位名称:"+rs.getString("dutyName"));DutyManagementF.labelPart.setText("所属部门:"+rs.getString("department"));}} catch (SQLException e) {e.printStackTrace();}}}/*** 清空历史纪录* 清空数据库*/else if(arg0.getSource()==DivianageF.clearBtn) {String sql="delete from  departmentHistory";//删除String sql2="select * from departmentHistory";//查询if(JOptionPane.showConfirmDialog(null, "确定删除,数据一经删除将不会找回")==0) {try {if(Dao.clearHistory(sql)>0) {DivianageF.displayTable(Dao.allData (sql2));//更新历史纪录表格JOptionPane.showMessageDialog(null, "清空成功");}else {JOptionPane.showMessageDialog(null, "清空失败");}} catch (Exception e) {e.printStackTrace();}  }}/*** 填充部门历史纪录表格*/else if(arg0.getSource()==DivianageF.historyDepart) {String sql="select * from departmentHistory";try {DivianageF.displayTable(Dao.allData (sql));} catch (SQLException e) {e.printStackTrace();}}/*** 查找岗位*/else if(arg0.getSource()==DutyManagementF.searchBtn) {String sql="select * from duty where dutyNum=?";Duty duty=new Duty();if(StringUtils.isEmpty(DutyManagementF.searchField.getText())) {JOptionPane.showMessageDialog(null, "请输入!");}else {duty.setDutyNum(Integer.parseInt(DutyManagementF.searchField.getText()));try {ResultSet rs=Dao.searchDuty(duty, sql);while(rs.next()) {DutyManagementF.labelNum.setText("岗位代号:"+rs.getString("dutyNum"));DutyManagementF.labelName.setText("岗位名:"+rs.getString("dutyName"));DutyManagementF.labelPart.setText("所属部门:"+rs.getString("department"));}} catch (SQLException e) {e.printStackTrace();}}}/*** 保存招聘计划*/else if(arg0.getSource()==DutyDesignD.saveBtn) {if( StringUtils.isEmpty(DutyDesignD.numField.getText())) {JOptionPane.showMessageDialog(null, "人数不能为空!");return;}else if(StringUtils.isEmpty(DutyDesignD.processField.getText())) {JOptionPane.showMessageDialog(null, "招聘计划不能为空!");}else {if(JOptionPane.showConfirmDialog(null, "确定保存!")==0) {String sql="insert into recruitPlan values(?,?,?,?,?)";RecruitPlan rp=new RecruitPlan();rp.setDutyName(String.valueOf(DutyDesignD.dutyName.getSelectedItem()));rp.setPartName(String.valueOf(DutyDesignD.partName.getSelectedItem()));rp.setDliploma(String.valueOf(DutyDesignD.diplomaBox.getSelectedItem()));rp.setNum(Integer.parseInt(DutyDesignD.numField.getText()));rp.setProcess(DutyDesignD.processField.getText());try {if( Dao.addOrModifyRecruitPlan(rp, sql)==1) {JOptionPane.showMessageDialog(null, "保存成功!");}else {JOptionPane.showMessageDialog(null, "保存失败!");}} catch (SQLException e) {e.printStackTrace();}}}}/*** 保存所出的题试卷*/else if(arg0.getSource()==OutPaperD.saveBtn) {String sql="insert into paper(topic,A,B,C,D,answer) values(?,?,?,?,?,?)";Paper paper=new Paper();paper.setTopic(OutPaperD.topicField.getText());paper.setA(OutPaperD.aField.getText());paper.setB(OutPaperD.bField.getText());paper.setC(OutPaperD.cField.getText());paper.setD(OutPaperD.dField.getText());if(OutPaperD.rdA.isSelected()) {paper.setAnswer("A");}else if(OutPaperD.rdB.isSelected()) {paper.setAnswer("B");}else if(OutPaperD.rdC.isSelected()) {paper.setAnswer("C");}else {paper.setAnswer("D");}try {if(Dao.addOrModifyPaper(paper, sql)>0) {JOptionPane.showMessageDialog(null, "成功保存!");}else {JOptionPane.showMessageDialog(null, "成功失败!");}} catch (SQLException e) {e.printStackTrace();}}/*** 保存员工提交的简历*/else if(arg0.getSource()==EmployeeInfoF2.submitBtn) {Employee emp=new Employee();String sql="insert into employeeFileTemp(profesion,name,sex,age,birthDay,address,race,marriage,politicStatus,"+ "phoneNum,id_Card,collage,major,cultureStandard,jobTime ,"+ "creditNum,imagePath,curriculum) values(?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?,?,?,?)";emp.setName(EmployeeInfoF2.nameField.getText());if((EmployeeInfoF2.manBtn.isSelected())){emp.setSex("男");}else {emp.setSex("女");}emp.setAge(Integer.parseInt(EmployeeInfoF2.ageField.getText()));emp.setBirthDay(EmployeeInfoF2.birthDayField.getText());emp.setAddress(EmployeeInfoF2.addressField.getText());emp.setRace(String.valueOf(EmployeeInfoF2.comborace.getSelectedItem()));if(EmployeeInfoF2.yesBtn.isSelected() ) {emp.setMarriage("是");}else {emp.setMarriage("否");}emp.setPoliticState(String.valueOf(EmployeeInfoF2.comboPolitStatus.getSelectedItem()));emp.setPhoneNum(Double.parseDouble(EmployeeInfoF2.phoneNumField.getText()));emp.setId_card(Double.parseDouble(EmployeeInfoF2.id_cardField.getText()));emp.setCollage(EmployeeInfoF2.collageField.getText());emp.setMajor(EmployeeInfoF2.majorField.getText());emp.setCultureStandard(String.valueOf(EmployeeInfoF2.comboCulture.getSelectedItem()));emp.setJobTime(EmployeeInfoF2.jobTimeField.getText());emp.setCreditNum(Double.parseDouble(EmployeeInfoF2.creditNumField.getText()));emp.setProfesion(String.valueOf(EmployeeInfoF2.comboType.getSelectedItem()));emp.setImagePath(EmployeeInfoF2.selectedFile.getAbsolutePath());emp.setCurriculum(EmployeeInfoF2.textArea.getText());try {if(Dao.addOrModApliFile(emp, sql)==1) {JOptionPane.showMessageDialog(null, "提交成功!");}else {JOptionPane.showMessageDialog(null, "提交失败!");}} catch (SQLException e) {e.printStackTrace();}}/*** 录用此员工,保存到数据库* 	EmployeeInfoFShow*/else if(arg0.getSource()==EmployInfoD.saveBtn) {Employee emp=new Employee();emp.setJobNum(Integer.parseInt(EmployInfoD.nameMark.getText()));emp.setName(EmployeeInfoFShow.nameField.getText());if(EmployeeInfoFShow.manBtn.isSelected()) {emp.setSex("男");}else {emp.setSex("女");}emp.setAge(Integer.parseInt(EmployeeInfoFShow.ageField.getText()));emp.setBirthDay(EmployeeInfoFShow.birthDayField.getText());emp.setAddress(EmployeeInfoFShow.addressField.getText());emp.setRace(String.valueOf(EmployeeInfoFShow.comborace.getSelectedItem()));if(EmployeeInfoFShow.yesBtn.isSelected()) {emp.setMarriage("是");}else {emp.setMarriage("否");}emp.setPoliticState(EmployeeInfoFShow.comboPolitStatus.getSelectedItem().toString());emp.setPhoneNum(Double.parseDouble(EmployeeInfoFShow.phoneNumField.getText()));emp.setId_card(Double.parseDouble(EmployeeInfoFShow.id_cardField.getText()));emp.setCollage(EmployeeInfoFShow.collageField.getText());emp.setMajor(EmployeeInfoFShow.majorField.getText());emp.setCultureStandard(EmployeeInfoFShow.comboCulture.getSelectedItem().toString());emp.setJobTime(EmployeeInfoFShow.jobTimeField.getText());emp.setCreditNum(Double.parseDouble(EmployeeInfoFShow.creditNumField.getText()));emp.setProfesion(EmployeeInfoFShow.comboType.getSelectedItem().toString());emp.setStatus(EmployInfoD.statusCombo.getSelectedItem().toString());emp.setRegistrant(EmployInfoD.regisPerson.getText());emp.setImagePath(EmployeeFile.imagePath); emp.setCurriculum(EmployeeInfoFShow.textArea.getText());emp.setDepartment(EmployInfoD.departCombo.getSelectedItem().toString());String sql="insert into employeeFile(jobNum,name,sex,age,birthDay,address,race,marriage,politicStatus ,"+ "phoneNum,id_Card,collage,major,cultureStandard,jobTime,"+ "creditNum,profesion,status,signTime,registrant,imagePath,curriculum,department) values(?,?,?,?,?,  ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?)";try {if(Dao.addOrModifyEmFile(emp, sql)>0) {JOptionPane.showMessageDialog(null, "录用成功");}else {JOptionPane.showMessageDialog(null, "录用失败");}} catch (Exception e) {e.printStackTrace();}  }/*** 删除题库中的试题*/else if(arg0.getSource()==PaperBankD.deleteBtn) {if(StringUtils.isEmpty(PaperBankD.idField.getText())) {JOptionPane.showMessageDialog(null, "请输入试题编号!");return;}else {if(JOptionPane.showConfirmDialog(null, "确定要删除!")==0) {Paper paper=new Paper();paper.setId(Integer.parseInt(PaperBankD.idField.getText()));try {if(Dao.deletePaper(paper)>0) {String sql1="select * from paper";PaperBankD.displayTable(Dao.allData(sql1));//刷性表格PaperBankD.idField.setText("");//清空输入框JOptionPane.showMessageDialog(null, "删除成功!");}else {JOptionPane.showMessageDialog(null, "删除失败!");}} catch (Exception e) {e.printStackTrace();}  }}}/** 工资发放*/else if(arg0.getSource()==SalaryCount.provideBtn) {String sql="insert into moneyData values(?,?,?,?,?,?,?,?)";if(StringUtils.isEmpty(SalaryCount.jobNumField.getText())) {JOptionPane.showMessageDialog(null, "工号不能为空!");return;}else if(!SalaryCount.checkBtn.isSelected()) {JOptionPane.showMessageDialog(null, "请同意相关协议!");return;}else {Money m=new Money();m.setJobNum(Double.parseDouble(SalaryCount.jobNumField.getText()));m.setName(SalaryCount.nameField.getText());m.setSalary(Float.parseFloat(SalaryCount.salaryField.getText()));m.setGradeMoney(Float.parseFloat(SalaryCount.gradeField.getText()));m.setEffectMoney(Float.parseFloat(SalaryCount.effectField.getText()));m.setCheckAdd(Float.parseFloat(SalaryCount.addField.getText()));m.setCheckDec(Float.parseFloat(SalaryCount.delField.getText()));m.setCultureMoney(Float.parseFloat(SalaryCount.cultureField.getText()));try {if(Dao.addOrModifyMoney(m, sql)==1) {JOptionPane.showMessageDialog(null, "工资已发放!");}else {JOptionPane.showMessageDialog(null, "出错!");return;}} catch (Exception e) {e.printStackTrace();} }}/*** 搜索要发工资的员工*/else if(arg0.getSource()==SalaryCount.searchBtn) {String sql="select * from employeeFile where jobNum=?";String sql2="select * from moneyInfo where jobNum=?";if( StringUtils.isEmpty(SalaryCount.jobNumField.getText())){JOptionPane.showMessageDialog(null, "请输入!");}else {Employee emp=new Employee();emp.setJobNum(Double.parseDouble(SalaryCount.jobNumField.getText()));try {ResultSet r=Dao.searchEmployeeFile(emp, sql2);while(r.next()) {SalaryCount.num.setText("工号:"+ String.valueOf(r.getInt("jobNum")));SalaryCount.name.setText("姓名:"+r.getString("name"));SalaryCount.pro.setText("岗位:"+r.getString("profesion"));SalaryCount.check.setText( "考勤:"+r.getString("type"));SalaryCount.culture.setText("学历:"+r.getString("cultureStandard"));}} catch (SQLException e) {e.printStackTrace();}try {ResultSet rs = Dao.searchEmployeeFile(emp, sql);while(rs.next()) {SalaryCount.nameField.setText(rs.getString("name"));SalaryCount.dutyField.setText(rs.getString("profesion"));SalaryCount.creditCardField.setText(String.valueOf(rs.getDouble("creditNum")));}} catch (SQLException e) {e.printStackTrace();}}}/*** 生成试卷*/else if(arg0.getSource()==BirthPaper .birthBtn) {String sql="insert into setPaper(paperNum,paperTime) values(?,?)";int num= Integer.parseInt(BirthPaper.idField.getText());//题目总数int times=Integer.parseInt(BirthPaper.timeField.getText());SetPaper sp=new SetPaper();sp.setPaperNum(num);sp.setPaperTime(times);try {if(Dao.aOrMPaSet(sp, sql)==1) {JOptionPane.showMessageDialog(null, "试卷生成成功!");}else {JOptionPane.showMessageDialog(null, "试卷生成失败!");}} catch (SQLException e) {e.printStackTrace();}}/*** 计算成绩* 保存成绩*/else if(arg0.getSource()==testPaper.submitBtn) {String sql="select * from paper ";String sql1="insert into grades (score,name) values(?,?)";String value="";int score=1;try {ResultSet rs=Dao.allData(sql);while(rs.next()) {if(testPaper.rdbtnA.isSelected()) {value="A";}else if(testPaper.rdbtnB.isSelected()) {value="B";}else if(testPaper.rdbtnC.isSelected()) {value="C";}else if(testPaper.rdbtnD.isSelected()) {value="D";}if(rs.getString("answer").equals(value)) {++score;}}Grade g=new Grade();g.setScore(score);g.setName( testPaper.name);if(Dao.saveScore(g, sql1)==1) {JOptionPane.showMessageDialog(null, "成绩上传成功!");JOptionPane.showMessageDialog(null, "你的成绩为:"+score+"分");testPaper.submitBtn.setEnabled(false);testPaper.fBtn.setEnabled(false);testPaper.bBtn.setEnabled(false);testPaper.button.setEnabled(false);}else {JOptionPane.showMessageDialog(null, "成绩上传失败!");}} catch (SQLException e) {e.printStackTrace();}}}
}

(35) AllMouseListener

package com.employee.implement;import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;import com.employee.frame.AttendanceManage;
import com.employee.frame.DivianageF;
import com.employee.frame.DutyManagementF;public class AllMouseListener implements MouseListener {@Overridepublic void mouseClicked(MouseEvent arg0) {}@Overridepublic void mouseEntered(MouseEvent arg0) {}@Overridepublic void mouseExited(MouseEvent arg0) {}@Overridepublic void mousePressed(MouseEvent arg0) {/*** 考勤管理表格事件* 将按下表格行的数据显示在左侧文本框中*/if(arg0.getSource()==AttendanceManage.table) {int row=AttendanceManage.table.getSelectedRow();AttendanceManage.jobNumField.setText(String.valueOf(AttendanceManage.table.getValueAt(row, 0)));AttendanceManage.nameField.setText((String) AttendanceManage.table.getValueAt(row, 1));AttendanceManage.typeField.setText((String) AttendanceManage.table.getValueAt(row, 2));AttendanceManage.dateField.setText((String) AttendanceManage.table.getValueAt(row, 3));}/*** 部门管理表格事件响应*/else if(arg0.getSource()==DivianageF.table) {int row=DivianageF.table.getSelectedRow();DivianageF.nameMarkField.setText(String.valueOf(DivianageF.table.getValueAt(row, 0)));DivianageF.nameField.setText((String) DivianageF.table.getValueAt(row, 1));DivianageF.namePersonField.setText((String) DivianageF.table.getValueAt(row, 2));	 }/*** 岗位管理表格事件*/else if(arg0.getSource()==DutyManagementF.table) {int row= DutyManagementF.table.getSelectedRow();DutyManagementF.numField.setText( String.valueOf(DutyManagementF.table.getValueAt(row, 0)));DutyManagementF.dutyField.setText((String) DutyManagementF.table.getValueAt(row, 1));}}@Overridepublic void mouseReleased(MouseEvent arg0) {}}

(36)RegisterAction

package com.employee.implement;import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;import com.employee.frame.RegisterF;public class RegisterAction implements ActionListener {@Overridepublic void actionPerformed(ActionEvent arg0) {new RegisterF();}}

(37) clearAttendance

package com.employee.kit;import com.employee.frame.AttendanceAddD;
import com.employee.frame.AttendanceManage;public class clearAttendance {public static void clearText() {AttendanceManage.jobNumField.setText("");AttendanceManage.nameField.setText("");AttendanceManage.typeField.setText("");AttendanceManage.dateField.setText("");}public static void clearAdd() {AttendanceAddD.jobNumField.setText("");AttendanceAddD.nameField.setText("");AttendanceAddD.typeField.setText("");AttendanceAddD.dateField.setText("");}private clearAttendance() {}}

(38)ClearDuty

package com.employee.kit;import com.employee.frame.AddDutyDialog;
import com.employee.frame.DutyDesignD;public class ClearDuty {/*** 清空建立岗位文本框*/public static void  clearText() {AddDutyDialog.numField.setText("");AddDutyDialog.dutyField.setText("");AddDutyDialog.comboBox.setSelectedIndex(0);}/*** 清空招聘计划文本框*/public static void cleardutyDesignText() {DutyDesignD.dutyName.setSelectedIndex(0);DutyDesignD.partName.setSelectedIndex(0);DutyDesignD.diplomaBox.setSelectedIndex(0);DutyDesignD.numField.setText("");DutyDesignD.processField.setText("");}}

(39)ClearTextOfDepart

package com.employee.kit;import com.employee.frame.DivianageF;
import com.employee.frame.EstablishDepartmentF;public class ClearTextOfDepart {public static  void clearDepartText() {DivianageF.nameMarkField.setText("");DivianageF.nameField.setText("");DivianageF.namePersonField.setText("");}public static  void clearEstablishText() {EstablishDepartmentF .nameMarkField.setText("");EstablishDepartmentF .nameField.setText("");EstablishDepartmentF .namePersonField.setText("");}}

(40)Md5Password

package com.employee.kit;import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;public class Md5Password {/*** 密码加密* @param password* @return* @throws NoSuchAlgorithmException*/public static String  md5Value(String password) throws NoSuchAlgorithmException {MessageDigest md5=MessageDigest.getInstance("MD5");byte[]md5Value=md5.digest(password.getBytes());BigInteger big=new BigInteger(1,md5Value);return big.toString();}}

(41)StringUtils

package com.employee.kit;public class StringUtils {public static  boolean isEmpty(String str) {if(str==null||"".equals(str.trim())) {return true;}else{return false;}}public static boolean isNotEmpty(String str) {if(str!=null&&!str.trim().equals("")) {return true;}else {return false;}}}

(42)TextClue

package com.employee.kit;import javax.swing.JOptionPane;import com.employee.frame.DivianageF;
import com.employee.frame.EstablishDepartmentF;public class TextClue {private static StringUtils  str ;public static boolean  showDepartDialog() {str=new StringUtils ();if(str.isEmpty(DivianageF.nameMarkField.getText()) ) {JOptionPane.showMessageDialog( null,"部门代号不能为空!");return false;}else if(str.isEmpty(DivianageF.nameField.getText())) {JOptionPane.showMessageDialog( null,"部们名不能为空!");return false;}else   if(str.isEmpty(DivianageF.namePersonField.getText())) {JOptionPane.showMessageDialog( null,"建立人不能为空!");return false;}else {return true;}}public static boolean showEstablishDialog() {str=new StringUtils ();if(str.isEmpty(EstablishDepartmentF.nameMarkField.getText()) ) {JOptionPane.showMessageDialog( null,"部门代号不能为空!");return false;}else if(str.isEmpty(EstablishDepartmentF.nameField.getText())) {JOptionPane.showMessageDialog( null,"部们名不能为空!");return false;}else   if(str.isEmpty(EstablishDepartmentF.namePersonField.getText())) {JOptionPane.showMessageDialog( null,"建立人不能为空!");return false;}else {return true;}}}

见----------基于java+swing+mysql+JFeeChart的企业人力资源管理系统(2)--------------

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/517580.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

十年架构师:我是这样手写Spring的,用300行代码体现优雅之道

起源Spring作为一个开源框架&#xff0c;于2003 年兴起的一个轻量级的Java 开发框架&#xff0c;由Rod Johnson 在其著作《Expert One-On-One J2EE Development and Design》中阐述的部分理念和原型衍生而来。它是为了解决企业应用开发的复杂性而创建的。框架的主要优势之一就是…

深度 | 打败围棋冠军后,机器智能下一步能战胜黑客吗?

阿里妹导读&#xff1a;从深蓝战胜象棋冠军到AlphaGo战胜围棋冠军&#xff0c;每一次机器智能在特定领域战胜人类&#xff0c;都会引发整个社会的广泛关注。洞察了棋类博弈真相的机器智能&#xff0c;接下来能洞察网络安全的真相并且在黑客博弈中战胜人类吗&#xff1f;在机器智…

mybatisplus 一次性执行多条SQL语句插入(Oracle篇)

文章目录一、数据库部分1. 创建数据库2. 初始化表结构二、代码部分2.1. controller2.2. mapper接口2.3. 映射文件2.4. 参数封装三、测试验证3.1. 发起请求3.2. 查看数据库3.3. 配置文件部分一、数据库部分 1. 创建数据库 创建more-insert 2. 初始化表结构 -- 一次性插入多张…

从310到蚂蚁森林,蚂蚁金服在线图计算的创新与实践

蚂蚁金服过去十五年&#xff0c;重塑支付改变生活&#xff0c;为全球超过十二亿人提供服务&#xff0c;这些背后离不开技术的支撑。在 2019 杭州云栖大会上&#xff0c;蚂蚁金服将十五年来的技术沉淀&#xff0c;以及面向未来的金融技术创新和参会者分享。我们将其中的优秀演讲…

Seata 与 Nacos注册中心整合实现集群环境搭建_02

接上一篇&#xff1a;Seata 单机环境搭建_01 文章目录一、整体架构二、安装步骤2.1. 创建数据库2.2. 初始化表结构2.3. 修改配置文件2.4. 调整数据库驱动2.5. 修改配置中心三、 启动和验证3.1. 启动nacos3.2. 启动TC Server3.3. 验证高可用一、整体架构 我们来学习部署集群 Se…

趣谈程序员真香定律:源码即设计

来源 | 码砖杂役责编 | Carol封图 | CSDN 付费下载自视觉中国我们经常谈论架构&#xff0c;讨论设计&#xff0c;却甚少关注实现和代码本身&#xff0c;架构和设计固然重要&#xff0c;但要说代码本身不重要&#xff0c;我不同意&#xff0c;Robert C.Martin大叔也不同意&#…

Nacos 1.1.4 发布,业界率先支持 Istio MCP 协议

Nacos是阿里巴巴开源的服务发现与配置管理项目&#xff0c;本次发布的1.1.4版本&#xff0c;主要带来的是与Istio的对接功能&#xff0c;使用的是Istio最新的MCP协议。本文将介绍包括这个功能在内的新版本发布的功能。 升级指南 服务端 0.8.0及以上版本&#xff1a; 解压安…

Seata 与 Nacos Config配置中心整合_03

前言&#xff1a;之前我们只将nacos注册中心和seata进行了整合&#xff0c;如果需要实现完整的功能还需要与nacos的配置中心进行整合。 文章目录一、配置管理1. 创建文件config.txt2. 创建nacos-config.sh3. 配置导入nacos配置中心4. 配置验证一、配置管理 1. 创建文件config.…

牛!阿里云位居中国金融云市场第一

近日&#xff0c;全球权威市场研究机构IDC发布《中国金融云解决方案市场跟踪研究&#xff0c;2019H1》报告&#xff1a;阿里云位居中国金融云解决方案市场第一&#xff0c;并成为市场份额突破两位数的唯一厂商&#xff0c;同比增长超过90%。 IDC统计数据显示&#xff0c;阿里云…

抖音、快手和直播行业的火爆究竟给了谁机会?

经常收到一些CSDN小伙伴的留言&#xff0c;反馈如下这样的困惑“短视频这么火爆&#xff0c;我该学些什么技术才能入行&#xff1f;”“我想从事音视频开发&#xff0c;该如何入门和进阶&#xff1f;真的像坊间传闻的那么难吗&#xff1f;”音视频的开发前景做一个不恰当的比喻…

闲鱼前端基于serverless的一种多端开发解决方案

前端的发展太快了&#xff0c;前端框架和技术的发展也层出不穷&#xff0c;还包括不同智能设备的出现&#xff0c;对前端开发同学来说是个很大的跳转&#xff0c;简单列举下&#xff1a; 前端框架&#xff1a;vue、react、angular小程序&#xff1a;微信小程序、支付宝小程序、…

Seata 的AT模式需求实战_04

接上一篇&#xff1a;Seata 与 Nacos Config配置中心整合_03 模拟下单场景&#xff1a;首先去在自己的本地创建一条下单记录&#xff0c;同时&#xff0c;还要去调用库存服务&#xff0c;执行减库存操作。 文章目录一、数据库部分1. 订单库创建2. 表结构初始化3. 库存数据库创建…

国产数据库技术全面破冰,金融核心系统打破国外巨头垄断指日可待

作者 | 马超责编 | 伍杏玲头图 | CSDN下载自东方IC出品 | CSDN&#xff08;ID:CSDNnews&#xff09; 作为一名金融IT人&#xff0c;打造完全自主掌控的金融核心&#xff0c;是我们心中的梦想。年轻的读者可能不太了解过去金融系统的建设往事&#xff0c;我们一直沿用至2013年的…

Go语言出现后,Java还是最佳选择吗?

阿里妹导读&#xff1a;随着大量新生的异步框架和支持协程的语言(如Go)的出现&#xff0c;在很多场景下操作系统的线程调度成为了性能的瓶颈&#xff0c;Java也因此被质疑是否不再适应最新的云场景了。4年前&#xff0c;阿里JVM团队开始自研Wisp2&#xff0c;将Go语言的协程能力…

为何小程序上线了,他们的内心却留下遗憾?

前言 出于多端投放和开放生态的考虑&#xff0c;闲鱼开始接入整个阿里小程序体系。闲鱼在9月份迅速上线了第一个小程序鱼塘小程序&#xff0c;由于刚接触不熟悉小程序体系&#xff0c;整体性能上有比较大的优化空间&#xff0c;主要表现在以下问题&#xff1a; 小程序加载慢&…

高德亿级流量接入层服务的演化之路

2019杭州云栖大会上&#xff0c;高德地图技术团队向与会者分享了包括视觉与机器智能、路线规划、场景化/精细化定位时空数据应用、亿级流量架构演进等多个出行技术领域的热门话题。现场火爆&#xff0c;听众反响强烈。我们把其中的优秀演讲内容整理成文并陆续发布出来&#xff…

一篇与众不同的 String、StringBuilder 和 StringBuffer 详解

来源 | 程序员 cxuan责编 | Carol封图 | CSDN 付费下载自视觉中国这是一道老生常谈的问题了&#xff0c;字符串是不仅是 Java 中非常重要的一个对象&#xff0c;它在其他语言中也存在。比如 C、Visual Basic、C# 等。字符串使用 String 来表示&#xff0c;字符串一旦被创建出来…

Ververica Platform-阿里巴巴全新Flink企业版揭秘

摘要&#xff1a;2019云栖大会大数据 & AI专场&#xff0c;阿里巴巴资深技术专家王峰带来“Ververica Platform-阿里巴巴全新Flink企业版揭秘”的演讲。本文主要从Ververica由来开始谈起&#xff0c;着重讲了Ververica Platform的四个核心插件App Manager、Libra Service、…

滴滴经验分享:SQLFlow如何让运营专家用上AI?

蚂蚁金服过去十五年&#xff0c;重塑支付改变生活&#xff0c;为全球超过十二亿人提供服务&#xff0c;这些背后离不开技术的支撑。在2019杭州云栖大会上&#xff0c;蚂蚁金服将十五年来的技术沉淀&#xff0c;以及面向未来的金融技术创新和参会者分享。我们将其中的优秀演讲整…

秒杀场景_Sentinel在秒杀场景的应用_05

上一篇解决了在高并发秒杀场景下的超卖问题&#xff0c;这一篇主要解决如何利用Sentinel防止服务器雪崩。 文章目录一、 商品微服务集成Sentinel1. 引入依赖2. 添加配置二、 秒杀微服务集成Sentinel2.1. 引入依赖2.2. 添加配置三、 Sentinel流控规则3.1. 登录Sentinel3.2. 请求…