Java课程设计-人事管理系统_第1页
Java课程设计-人事管理系统_第2页
Java课程设计-人事管理系统_第3页
Java课程设计-人事管理系统_第4页
Java课程设计-人事管理系统_第5页
已阅读5页,还剩55页未读 继续免费阅读

下载本文档

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

文档简介

1、Java语言程序设计课程设计实验报告实验工程名称:人事管理系统摘要:该系统能够对某单位的职工进行管理,主要功能如下:a、人事资料输入:输入员工信息,如姓名、身份证号、地址、 、部门、工资、参加工作时间、专业、职务、备注等。b、信息查询:可根据职工编号、职工名称、出生年月范围、工资范围、参加工作时间范围等条件查询。c、登陆检测、用户管理、密码修改、权限设置。d 、系统初始化:包括操作员信息初始化和职工信息初始化。e、用户信息修改:拥有权限的操作员可以修改、冻结、删除普通用户。f、简单的帮助文档:对软件的简单介绍和编制说明。关键词:信息管理、Java、文档正文:问题重述设计一个人事管理系统,该系统

2、能够对某单位的职工进行管理,主要功能如下:a、人事资料输入:输入员工信息,如姓名、身份证号、地址、 、部门、工资、参加工作时间、专业、职务、备注等。b、信息查询:可根据职工编号、职工名称、出生年月范围、工资范围、参加工作时间范围等条件查询。c、登陆检测、用户管理、密码修改、权限设置。d 、系统初始化:包括操作员信息初始化和职工信息初始化。e、用户信息修改:拥有权限的操作员可以修改、冻结、删除普通用户。f、简单的帮助文档:对软件的简单介绍和编制说明。理论分析1、从管理员角度讲,实现的功能是: 1 对员工有关数据的输入功能 a) 实现对员工根本信息的输入 b) 实现对员工奖惩信息的输入 2 对员工

3、有关数据的更新功能 由管理员进行档案收集,经过对档案资料的处理,更新员工档案管理系统中的奖惩相关信息包括员工根本信息和员工业绩信息。 3 对员工档案信息的查询功能 管理员可以通过自己的用户名和密码在因特网上对所有员工的信息包括员工的档案信息、员工的业绩信息进行查询。 4 对员工、部门和部门领导信息的简单管理 5 对用户密码的管理 2、从普通用户员工的角度讲,实现的功能是: 1在单位员工可以通过自己的编号和密码在因特网上对自己的个人信息包括个人的档案信息、业绩信息进行查询。 2 对用户密码的管理模型员工信息,如姓名、身份证号、地址、 、部门、工资、参加工作时间、专业、职务、备注、职工编号、职工名

4、称、出生年月范围、工资范围、参加工作时间范围。程序流程图程序设计技术文档1、员工业绩管理:员工业绩信息包括所属员工员工编号和姓名、工种、类别、日期和业绩分数等。添加业绩以部门为单位点击添加业绩链接即可进入添加页面。从列表中选择部门以及工种、类别、日期,即可进行添加操作。查询员工成绩可以部门或具体某位员工为单位。以部门为单位,可显示某次考核整个部门的业绩信息,并进行排序等横向比照。还可动态生成图表,以业绩分布图、柱状图和饼状图的形式,形象地表示出考试情况,对分析考试内容有比较大的帮助。以员工为单位,可以显示某位员工工作后的所有业绩。并提供以员工编号和以姓名两种方式。更新员工以部门为单位,可以对某

5、次考核的业绩进行更新必须为已存在的。这个功能用来对误输入来进行更正。2部门领导信息管理:部门领导信息包括部门领导编号ii、姓名、对口专业、所在部门、职位等。这局部可以实现添加领导、添加与领导相关的部门信息等功能。程序使用说明(1)录入功能:提供有限权的人员登入对系统进行管理.(2)查询功能: 姓名匹配查询; 单位及部门匹配; 号码匹配查询;(3)修改功能包括多个域:修改所有的域,姓名、编号不能为空;(4).添加功能:增加一个新的记录;(5)删除功能:增加一个新的记录;(6)查询:核对人员对系统进行访问;(7)统计功能: 对员工个人业绩或人员调度的统计;(8)员工查询: 提供员工查询自己的业绩绩

6、;(9)其它查询: 提供他人访问数据库;针对给定实例程序运行情况1登陆界面2信息录入界面3信息修改界面设计总结:本次实验可经过进一步的修改完善应用于实际当中,通过各个模块的具体化实现以下功能:创立新部门,添加新领导,并绑定工资;设置不同的时间段,可以让管理者或查询者通过选时间来统计不同时间段的业绩;可以让读者通过选择不同种类的课程,来检索不同种类的工资。领导可以输入与他对应部门对应的员工的业绩,他的部门与员工对应。附件(局部源代码)package com.mwq.frame;import java.awt.BorderLayout;import java.awt.Color;import ja

7、va.awt.Desktop;ion;import java.awt.Font;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.io.File;import .URL;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOp

8、tionPane;import javax.swing.JPanel;import javax.swing.JTree;import javax.swing.SwingConstants;import javax.swing.SwingUtilities;import javax.swing.border.TitledBorder;import javax.swing.event.TreeSelectionEvent;import javax.swing.event.TreeSelectionListener;import javax.swing.tree.DefaultMutableTree

9、Node;import javax.swing.tree.DefaultTreeCellRenderer;import javax.swing.tree.DefaultTreeModel;import javax.swing.tree.TreePath;import com.mwq.PersonnelManage;import com.mwq.frame.personnel.BringUpSelectedPanel;import com.mwq.frame.personnel.RecordSelectedPanel;import com.mwq.frame.personnel.RewardsA

10、ndPunishmentPanel;import com.mwq.frame.personnel.TimecardPanel;import com.mwq.frame.system.DataPanel;import com.mwq.frame.system.FrameworkPanel;import com.mwq.frame.treatement.CriterionSetPanel;import com.mwq.frame.treatement.PersonnelSetPanel;import com.mwq.frame.treatement.ReportFormsPanel;import

11、com.mwq.frame.user.AddUserPanel;import com.mwq.frame.user.UpdatePasswordDialog;import com.mwq.hibernate.Dao;import com.mwq.hibernate.mapping.TbRecord;public class IndexFrame extends JFrame private JTree tree;final JPanel rightPanel = new JPanel();private TbRecord record;private final Dao dao = Dao.g

12、etInstance();/* * Launch the application * * param args */public static void main(String args) try IndexFrame frame = new IndexFrame(null);frame.setVisible(true); catch (Exception e) e.printStackTrace();/* * Create the frame */public IndexFrame(TbRecord tbRecord) super();this.record = tbRecord;setRe

13、sizable(false);setExtendedState(IndexFrame.MAXIMIZED_BOTH);/ 设置窗口以最大化翻开setTitle( T 科技);setBounds(0, 0, 950, 700);setBounds(0, 0, 1024, 768);setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);final JPanel topPanel = new JPanel();topPanel.setLayout(new BorderLayout();topPanel.setPreferredSize(new Dimensio

14、n(0, 100);getContentPane().add(topPanel, BorderLayout.NORTH);final JLabel label = new JLabel();label.setHorizontalAlignment(SwingConstants.CENTER);label.setHorizontalTextPosition(SwingConstants.CENTER);URL resource = IndexFrame.this.getClass().getResource(/img/logo.JPG);ImageIcon icon = new ImageIco

15、n(resource);label.setIcon(icon);label.setBorder(new TitledBorder(null, ,TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION, null, null);label.setPreferredSize(new Dimension(160, 0);topPanel.add(label, BorderLayout.WEST);final JPanel buttonPanel = new JPanel();/ 创立工具栏面板final GridLayout

16、gridLayout = new GridLayout(1, 0);/ 创立一个水平箱式布局管理器对象gridLayout.setVgap(6);/ 箱的垂直间隔为6像素gridLayout.setHgap(6);/ 箱的水平间隔为6像素buttonPanel.setLayout(gridLayout);/ 设置工具栏面板采用的布局管理器为箱式布局buttonPanel.setBackground(new Color(90, 130, 189);/ 设置工具栏面板的背景色buttonPanel.setBorder(new TitledBorder(null, ,TitledBorder.DEF

17、AULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION, null, null);/ 设置工具栏面板采用的边框样式topPanel.add(buttonPanel, BorderLayout.CENTER);/ 将工具栏面板添加到上级面板中final JButton recordShortcutKeyButton = new JButton();/ 创立进入“档案管理的快捷按钮resource = this.getClass().getResource(/img/record.JPG);icon = new ImageIcon(resource);re

18、cordShortcutKeyButton.setIcon(icon);/ 为按钮添加事件监听器,用来捕获按钮被点击的事件recordShortcutKeyButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) rightPanel.removeAll();/ 移除内容面板中的所有内容rightPanel.add(new RecordSelectedPanel(rightPanel),BorderLayout.CENTER);/ 将档案管理面版添加到内容面板中SwingUt

19、ilities.updateComponentTreeUI(rightPanel);/ 刷新内容面板中的内容);buttonPanel.add(recordShortcutKeyButton);final JButton timecardShortcutKeyButton = new JButton();resource = this.getClass().getResource(/img/timecard.JPG);icon = new ImageIcon(resource);timecardShortcutKeyButton.setIcon(icon);timecardShortcutKe

20、yButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) rightPanel.removeAll();rightPanel.add(new TimecardPanel(), BorderLayout.CENTER);SwingUtilities.updateComponentTreeUI(rightPanel););buttonPanel.add(timecardShortcutKeyButton);final JButton rewardsAndPunishmentSh

21、ortcutKeyButton = new JButton();resource = this.getClass().getResource(/img/rewAndPun.JPG);icon = new ImageIcon(resource);rewardsAndPunishmentShortcutKeyButton.setIcon(icon);rewardsAndPunishmentShortcutKeyButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) rightP

22、anel.removeAll();rightPanel.add(new RewardsAndPunishmentPanel(),BorderLayout.CENTER);SwingUtilities.updateComponentTreeUI(rightPanel););buttonPanel.add(rewardsAndPunishmentShortcutKeyButton);final JButton reportFormsShortcutKeyButton = new JButton();resource = this.getClass().getResource(/img/stat.J

23、PG);icon = new ImageIcon(resource);reportFormsShortcutKeyButton.setIcon(icon);reportFormsShortcutKeyButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) rightPanel.removeAll();rightPanel.add(new ReportFormsPanel(), BorderLayout.CENTER);SwingUtilities.updateCompone

24、ntTreeUI(rightPanel););buttonPanel.add(reportFormsShortcutKeyButton);final JButton basicDataShortcutKeyButton = new JButton();resource = this.getClass().getResource(/img/data.JPG);icon = new ImageIcon(resource);basicDataShortcutKeyButton.setIcon(icon);basicDataShortcutKeyButton.addActionListener(new

25、 ActionListener() public void actionPerformed(ActionEvent e) rightPanel.removeAll();rightPanel.add(new DataPanel(), BorderLayout.CENTER);SwingUtilities.updateComponentTreeUI(rightPanel););buttonPanel.add(basicDataShortcutKeyButton);final JButton updatePasswordShortcutKeyButton = new JButton();resour

26、ce = this.getClass().getResource(/img/password.JPG);icon = new ImageIcon(resource);updatePasswordShortcutKeyButton.setIcon(icon);if (record = null)/ 当record为null时,说明是通过默认用户登录的,此时不能修改密码updatePasswordShortcutKeyButton.setEnabled(false);/ 在这种情况下设置按钮不可用updatePasswordShortcutKeyButton.addActionListener(n

27、ew ActionListener() public void actionPerformed(ActionEvent e) rightPanel.removeAll();SwingUtilities.updateComponentTreeUI(rightPanel);UpdatePasswordDialog dialog = new UpdatePasswordDialog();/ 创立用来修改密码的对话框dialog.setRecord(record);/ 将当前登录管理员的档案对象传入对话框dialog.setVisible(true);/ 设置对话框为可见的,即显示对话框);butto

28、nPanel.add(updatePasswordShortcutKeyButton);final JButton counterShortcutKeyButton = new JButton();resource = this.getClass().getResource(/img/calculator.JPG);icon = new ImageIcon(resource);counterShortcutKeyButton.setIcon(icon);counterShortcutKeyButton.addActionListener(new ActionListener() public

29、void actionPerformed(ActionEvent e) Desktop desktop = Desktop.getDesktop();/ 获得当前系统对象File file = new File(C:/WINDOWS/system32/calc.exe);/ 创立一个系统计算器对象try desktop.open(file);/ 翻开系统计算器 catch (Exception e1) / 当翻开失败时,弹出提示信息JOptionPane.showMessageDialog(null, 很抱歉,未能翻开系统自带的计算器!,友情提示, JOptionPane.INFORMATIO

30、N_MESSAGE);return;);buttonPanel.add(counterShortcutKeyButton);final JButton excelShortcutKeyButton = new JButton(););icon = new ImageIcon(resource);excelShortcutKeyButton.setIcon(icon);excelShortcutKeyButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) Desktop de

31、sktop = Desktop.getDesktop();File file = new File(res/other/new.xls);try desktop.open(file); catch (Exception e1) alog(null, 很抱歉,您的机器还没有安装Office!,友情提示, JOptionPane.INFORMATION_MESSAGE);return;);buttonPanel.add(excelShortcutKeyButton);final JButton exitShortcutKeyButton = new JButton();resource = thi

32、s.getClass().getResource(/img/exit.JPG);icon = new ImageIcon(resource);exitShortcutKeyButton.setIcon(icon);exitShortcutKeyButton.addActionListener(new ActionListener() public void actionPerformed(ActionEvent e) System.exit(0););buttonPanel.add(exitShortcutKeyButton);final JPanel leftPanel = new JPan

33、el();leftPanel.setBackground(new Color(90, 130, 189);leftPanel.setLayout(new BorderLayout();leftPanel.setBorder(new TitledBorder(null, ,TitledBorder.DEFAULT_JUSTIFICATION,TitledBorder.DEFAULT_POSITION, null, null);leftPanel.setPreferredSize(new Dimension(160, 0);getContentPane().add(leftPanel, Borde

34、rLayout.WEST);DefaultMutableTreeNode root = new DefaultMutableTreeNode(root);/ 创立树的根结点DefaultMutableTreeNode personnelNode = new DefaultMutableTreeNode(人事管理);/ 创立树的一级子结点personnelNode.add(new DefaultMutableTreeNode(档案管理);/ 创立树的叶子结点并添加到一级子结点personnelNode.add(new DefaultMutableTreeNode(考勤管理);personnelN

35、ode.add(new DefaultMutableTreeNode(奖惩管理);personnelNode.add(new DefaultMutableTreeNode(培训管理);root.add(personnelNode);/ 向根结点添加一级子结点DefaultMutableTreeNode treatmentNode = new DefaultMutableTreeNode(待遇管理);treatmentNode.add(new DefaultMutableTreeNode(账套管理);treatmentNode.add(new DefaultMutableTreeNode(人员设

36、置);treatmentNode.add(new DefaultMutableTreeNode(统计报表);root.add(treatmentNode);DefaultMutableTreeNode systemNode = new DefaultMutableTreeNode(系统维护);systemNode.add(new DefaultMutableTreeNode(企业架构);systemNode.add(new DefaultMutableTreeNode(根本资料);systemNode.add(new DefaultMutableTreeNode(初始化系统);root.add

37、(systemNode);DefaultMutableTreeNode userNode = new DefaultMutableTreeNode(用户管理);if (record = null) / 当record为null时,说明是通过默认用户登录的,此时只能新增用户,不能修改密码userNode.add(new DefaultMutableTreeNode(新增用户); else / 否那么为通过管理员登录String purview = record.getTbManager().getPurview();if (purview.equals(超级管理员) / 只有当管理员的权限为“超

38、级管理员时,才有权新增用户userNode.add(new DefaultMutableTreeNode(新增用户);userNode.add(new DefaultMutableTreeNode(修改密码);/ 只有通过管理员登录时才有权修改密码root.add(userNode);DefaultMutableTreeNode toolNode = new DefaultMutableTreeNode(系统工具);toolNode.add(new DefaultMutableTreeNode(翻开计算器);toolNode.add(new DefaultMutableTreeNode(翻开W

39、ORD);toolNode.add(new DefaultMutableTreeNode(翻开EXCEL);root.add(toolNode);DefaultTreeModel treeModel = new DefaultTreeModel(root);/ 通过树结点对象创立树模型对象tree = new JTree(treeModel);/ 通过树模型对象创立树对象tree.setBackground(Color.WHITE);/ 设置树的背景色tree.setRootVisible(false);/ 设置不显示树的根结点,默认为显示,即truetree.setRowHeight(24)

40、;/ 设置各结点的高度为27像素tree.setFont(new Font(宋体, Font.BOLD, 14);/ 设置结点的字体样式DefaultTreeCellRenderer renderer = new DefaultTreeCellRenderer();/ 创立一个树的绘制对象/ renderer.setLeafIcon(null);/ 设置叶子结点不采用图标renderer.setClosedIcon(null);/ 设置结点折叠时不采用图标renderer.setOpenIcon(null);/ 设置结点展开时不采用图标tree.setCellRenderer(renderer

41、);/ 将树的绘制对象设置到树中int count = root.getChildCount();/ 获得一级结点的数量for (int i = 0; i “档案管理添加人事档案,,其次通过“用户管理-“新增用户添加系统管理,员,最后通过新添加的管理员登录!, 需要注意的是,只有第一个被添加的管理员为,超级管理员,具有“新增用户的权限! ;JOptionPane.showMessageDialog(null,clueOn,友情提示,JOptionPane.INFORMATION_MESSAGE);dispose();new PersonnelManage(); else if (parentN

42、ode.equals(用户管理) System.out.println(用户管理);if (selectedNode.equals(新增用户) AddUserPanel addUserPanel = new AddUserPanel();addUserPanel.setRecord(record);rightPanel.add(addUserPanel,BorderLayout.CENTER); else / 修改密码rightPanel.removeAll();SwingUtilities.updateComponentTreeUI(rightPanel);UpdatePasswordDia

43、log updatePasswordDialog = new UpdatePasswordDialog();updatePasswordDialog.setRecord(record);updatePasswordDialog.setVisible(true); else if (Desktop.isDesktopSupported() Desktop desktop = Desktop.getDesktop();File file = null;try if (selectedNode.equals(翻开计算器) Runtime runtime = Runtime.getRuntime();

44、runtime.exec(calc.exe); else if (selectedNode.equals(翻开WORD) file = new File(src/office/new.doc);desktop.open(file); else / 翻开EXCELfile = new File(src/office/new.xls);desktop.open(file); catch (Exception e1) JOptionPane.showMessageDialog(null,很抱歉,未能翻开您请求的系统工具!,友情提示,JOptionPane.INFORMATION_MESSAGE);r

45、eturn;SwingUtilities.updateComponentTreeUI(rightPanel););leftPanel.add(tree);rightPanel.setLayout(new BorderLayout();rightPanel.setPreferredSize(new Dimension(0, 0);rightPanel.setBackground(new Color(255, 255, 247);rightPanel.setBorder(new TitledBorder(null, ,TitledBorder.DEFAULT_JUSTIFICATION,Title

46、dBorder.DEFAULT_POSITION, null, null);getContentPane().add(rightPanel, BorderLayout.CENTER);resource = this.getClass().getResource(/img/back.JPG);icon = new ImageIcon(resource);backgroundLabel.setIcon(icon);backgroundLabel.setHorizontalTextPosition(SwingConstants.CENTER);backgroundLabel.setHorizonta

47、lAlignment(SwingConstants.CENTER);rightPanel.add(backgroundLabel, BorderLayout.CENTER);/final JLabel backgroundLabel = new JLabel();package com.mwq.frame mon;import java.awt.BorderLayout;import java.util.Iterator;import java.util.Set;import java.util.Vector;import javax.swing.ImageIcon;import javax.

48、swing.JPanel;import javax.swing.JScrollPane;import javax.swing.JSplitPane;import javax.swing.JTable;import javax.swing.JTree;import javax.swing.event.TreeSelectionEvent;import javax.swing.event.TreeSelectionListener;import javax.swing.table.DefaultTableModel;import javax.swing.tree.DefaultMutableTre

49、eNode;import javax.swing.tree.DefaultTreeCellRenderer;import javax.swing.tree.DefaultTreeModel;import javax.swing.tree.TreePath;import com.mwq.hibernate.Dao;import com.mwq.hibernate.HibernateSessionFactory;import com.mwq.hibernate.mapping.TbDept;import com.mwq.hibernate.mapping.TbDutyInfo;import com

50、.mwq.hibernate.mapping.TbRecord;public class DeptAndPersonnelPanel extends JPanel private JTable table;private Vector tableColumnV;private VectorVector tableValueV;private DefaultTableModel tableModel;private JTree tree;private Dao dao = Dao.getInstance();public DeptAndPersonnelPanel() super();setLa

51、yout(new BorderLayout();final JSplitPane splitPane = new JSplitPane();splitPane.setDividerLocation(140);add(splitPane);final JScrollPane deptScrollPane = new JScrollPane();splitPane.setLeftComponent(deptScrollPane);/ 初始化左侧的部门树DefaultMutableTreeNode root = new DefaultMutableTreeNode(全部职员);TbDept comp

52、any = (TbDept) dao.queryDeptById(1);Set depts = company.getTbDepts();for (Iterator deptIt = depts.iterator(); deptIt.hasNext();) TbDept dept = (TbDept) deptIt.next();DefaultMutableTreeNode deptNode = new DefaultMutableTreeNode(dept.getName();/ 创立部门树的二级子节点root.add(deptNode);Set sonDepts = dept.getTbD

53、epts();for (Iterator sonDeptIt = sonDepts.iterator(); sonDeptIt.hasNext();) TbDept sonDept = (TbDept) sonDeptIt.next();deptNode.add(new DefaultMutableTreeNode(sonDept.getName();/ 创立部门树的叶子节点DefaultTreeModel treeModel = new DefaultTreeModel(root); / 利用根节点对象创立树模型对象tree = new JTree(treeModel);tree.addTr

54、eeSelectionListener(new TreeSelectionListener() public void valueChanged(TreeSelectionEvent e) TreePath path = e.getPath(); / 获得被选中树节点的路径tableValueV.removeAllElements();/ 移除表格中的所有行if (path.getPathCount() = 1) / 选中树的根节点showAllRecord();/ 显示所有档案 else / 选中树的子节点String deptName = path.getLastPathComponent

55、().toString();/ 获得选中部门的名称TbDept selectDept = (TbDept) dao.queryDeptByName(deptName);/ 检索指定部门对象Iterator sonDeptIt = selectDept.getTbDepts().iterator();if (sonDeptIt.hasNext() / 选中树的二级节点while (sonDeptIt.hasNext() showRecordInDept(TbDept) sonDeptIt.next();/ 显示选中部门所有子部门的档案 else / 选中树的叶子节点showRecordInDep

56、t(selectDept);/ 显示选中部门的档案tableModel.setDataVector(tableValueV, tableColumnV);HibernateSessionFactory.closeSession(););DefaultTreeCellRenderer render = new DefaultTreeCellRenderer();render.setLeafIcon(new ImageIcon();/ 设置叶子结点的图标render.setClosedIcon(new ImageIcon();/ 设置结点折叠时的图标render.setOpenIcon(new I

57、mageIcon();/ 设置结点展开时的图标tree.setCellRenderer(render);deptScrollPane.setViewportView(tree);final JScrollPane personnalScrollPane = new JScrollPane();splitPane.setRightComponent(personnalScrollPane);tableColumnV = new Vector();/ 创立表格列名向量String tableColumns = new String 序 号, 档案编号, 姓 名,性 别, 部 门, 职 务 ;for

58、 (int i = 0; i tableColumns.length; i+) / 添加表格列名tableColumnV.add(tableColumnsi);tableValueV = new VectorVector();/ 创立表格值向量showAllRecord();HibernateSessionFactory.closeSession();tableModel = new DefaultTableModel(tableValueV, tableColumnV);/ 创立表格模型对象table = new JTable(tableModel);/ 创立表格对象personnalScr

59、ollPane.setViewportView(table);private void showAllRecord() Iterator recordIt = dao.queryRecord().iterator();int sequenceNumber = 1;while (recordIt.hasNext() TbRecord record = (TbRecord) recordIt.next();Vector personnelV = new Vector();personnelV.add(sequenceNumber+);personnelV.add(record.getRecordN

60、umber();personnelV.add(record.getName();personnelV.add(record.getSex();TbDutyInfo dutyInfo = record.getTbDutyInfo();personnelV.add(dutyInfo.getTbDept().getName();personnelV.add(dutyInfo.getTbDuty().getName();tableValueV.add(personnelV);private void showRecordInDept(TbDept dept) Iterator dutyInfoIt =

温馨提示

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

评论

0/150

提交评论