📄 basicinfo.java
字号:
public void mouseClicked(MouseEvent arg0) {
otherRefresh(tabbedPane);
}
});
panel.add(scrollPane, gridBagConstraints);
final GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();
gridBagConstraints_2.gridx = 1;
gridBagConstraints_2.ipady = 15;
gridBagConstraints_2.ipadx = 25;
gridBagConstraints_2.insets = new Insets(0, 20, 10, 35);
gridBagConstraints_2.gridy = 0;
panel.add(tabbedPane, gridBagConstraints_2);
final JPanel panelJbzl = new JPanel();
panelJbzl.setLayout(new FormLayout(new ColumnSpec[] {
new ColumnSpec("37dlu"), FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("51dlu"), FormFactory.RELATED_GAP_COLSPEC,
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("45dlu"), FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("49dlu") }, new RowSpec[] {
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
new RowSpec("20dlu"), FormFactory.RELATED_GAP_ROWSPEC,
new RowSpec("20dlu") }));
tabbedPane.addTab("基本资料", null, panelJbzl, null);
final JLabel label = new JLabel();
label.setText("员工号:");
panelJbzl.add(label, new CellConstraints(1, 1, CellConstraints.FILL,
CellConstraints.DEFAULT));
Stano = new JTextField();
panelJbzl.add(Stano, new CellConstraints(3, 1, CellConstraints.FILL,
CellConstraints.FILL));
final JLabel label_1 = new JLabel();
label_1.setText("身份证号:");
panelJbzl.add(label_1, new CellConstraints(7, 1));
Cardno = new JTextField();
panelJbzl.add(Cardno, new CellConstraints(9, 1));
final JLabel label_2 = new JLabel();
label_2.setText("姓名:");
panelJbzl.add(label_2, new CellConstraints(1, 3));
final JLabel label_3 = new JLabel();
label_3.setText("档案编号:");
panelJbzl.add(label_3, new CellConstraints(7, 3));
final JLabel label_4 = new JLabel();
label_4.setText("性别:");
panelJbzl.add(label_4, new CellConstraints(1, 5));
final JLabel label_5 = new JLabel();
label_5.setText("政治面貌:");
panelJbzl.add(label_5, new CellConstraints(7, 5));
final JLabel label_6 = new JLabel();
label_6.setText("生日:");
panelJbzl.add(label_6, new CellConstraints(1, 7));
final JLabel label_7 = new JLabel();
label_7.setText("健康状况:");
panelJbzl.add(label_7, new CellConstraints(7, 7));
final JLabel label_8 = new JLabel();
label_8.setText("部门:");
panelJbzl.add(label_8, new CellConstraints(1, 9));
final JLabel label_9 = new JLabel();
label_9.setText("婚姻状况:");
panelJbzl.add(label_9, new CellConstraints(7, 9));
final JLabel label_10 = new JLabel();
label_10.setText("职称:");
panelJbzl.add(label_10, new CellConstraints(1, 11));
final JLabel label_11 = new JLabel();
label_11.setText("入司时间:");
panelJbzl.add(label_11, new CellConstraints(7, 11));
final JLabel label_12 = new JLabel();
label_12.setText("民族:");
panelJbzl.add(label_12, new CellConstraints(1, 13));
final JLabel label_13 = new JLabel();
label_13.setText("合同期限:");
panelJbzl.add(label_13, new CellConstraints(7, 13));
final JLabel label_14 = new JLabel();
label_14.setText("学历:");
panelJbzl.add(label_14, new CellConstraints(1, 15));
final JLabel label_15 = new JLabel();
label_15.setText("合同开始:");
panelJbzl.add(label_15, new CellConstraints(7, 15));
final JLabel label_16 = new JLabel();
label_16.setText("专业:");
panelJbzl.add(label_16, new CellConstraints(1, 17));
final JLabel label_17 = new JLabel();
label_17.setText("合同结束:");
panelJbzl.add(label_17, new CellConstraints(7, 17));
final JLabel label_18 = new JLabel();
label_18.setText("住址:");
panelJbzl.add(label_18, new CellConstraints(1, 19));
final JLabel label_19 = new JLabel();
label_19.setText("备注:");
panelJbzl.add(label_19, new CellConstraints(1, 21));
this.SName = new JTextField();
panelJbzl.add(this.SName, new CellConstraints(3, 3));
Recno = new JTextField();
panelJbzl.add(Recno, new CellConstraints(9, 3));
Sex = new JTextField();
panelJbzl.add(Sex, new CellConstraints(3, 5));
Politics = new JTextField();
panelJbzl.add(Politics, new CellConstraints(9, 5));
Birth = new JTextField();
panelJbzl.add(Birth, new CellConstraints(3, 7));
Body = new JTextField();
panelJbzl.add(Body, new CellConstraints(9, 7));
this.SDep = new JTextField();
panelJbzl.add(this.SDep, new CellConstraints(3, 9));
Married = new JTextField();
panelJbzl.add(Married, new CellConstraints(9, 9));
this.SDuty = new JTextField();
panelJbzl.add(this.SDuty, new CellConstraints(3, 11));
Indate = new JTextField();
panelJbzl.add(Indate, new CellConstraints(9, 11));
Baryear = new JTextField();
panelJbzl.add(Baryear, new CellConstraints(9, 13));
studyLevel = new JTextField();
panelJbzl.add(studyLevel, new CellConstraints(3, 15));
Barstart = new JTextField();
panelJbzl.add(Barstart, new CellConstraints(9, 15));
Special = new JTextField();
panelJbzl.add(Special, new CellConstraints(3, 17));
Barend = new JTextField();
panelJbzl.add(Barend, new CellConstraints(9, 17));
Address = new JTextField();
panelJbzl.add(Address, new CellConstraints(3, 19, 7, 1,
CellConstraints.DEFAULT, CellConstraints.FILL));
SBrief = new JTextField();
panelJbzl.add(SBrief, new CellConstraints(3, 21, 7, 1,
CellConstraints.DEFAULT, CellConstraints.FILL));
Folk = new JTextField();
panelJbzl.add(Folk, new CellConstraints(3, 13));
final JPanel panelGzjl = new JPanel();
panelGzjl.setLayout(new FormLayout(new ColumnSpec[] {
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("17dlu"), FormFactory.RELATED_GAP_COLSPEC,
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("95dlu") }, new RowSpec[] {
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC }));
tabbedPane.addTab("工作经历", null, panelGzjl, null);
final JLabel label_20 = new JLabel();
label_20.setText("开始时间:");
panelGzjl.add(label_20, new CellConstraints(5, 1));
Sdate = new JTextField();
panelGzjl.add(Sdate, new CellConstraints(7, 1));
final JLabel label_21 = new JLabel();
label_21.setText("结束时间:");
panelGzjl.add(label_21, new CellConstraints(5, 3));
Edate = new JTextField();
panelGzjl.add(Edate, new CellConstraints(7, 3));
final JLabel label_22 = new JLabel();
label_22.setText("单位:");
panelGzjl.add(label_22, new CellConstraints(5, 5));
Company = new JTextField();
panelGzjl.add(Company, new CellConstraints(7, 5));
final JLabel label_23 = new JLabel();
label_23.setText("部门:");
panelGzjl.add(label_23, new CellConstraints(5, 7));
final JLabel label_24 = new JLabel();
label_24.setText("职务:");
panelGzjl.add(label_24, new CellConstraints(5, 9));
final JLabel label_25 = new JLabel();
label_25.setText("开始时间:");
panelGzjl.add(label_25, new CellConstraints(5, 11));
textField_24 = new JTextField();
textField_24.setEditable(false);
textField_24.setText("暂时只保存一项经历");
panelGzjl.add(textField_24, new CellConstraints(7, 11));
final JLabel label_26 = new JLabel();
label_26.setText("一、");
panelGzjl.add(label_26, new CellConstraints(3, 1));
final JLabel label_27 = new JLabel();
label_27.setText("二、");
panelGzjl.add(label_27, new CellConstraints(3, 11));
eDep = new JTextField();
panelGzjl.add(eDep, new CellConstraints(7, 7));
eDuty = new JTextField();
panelGzjl.add(eDuty, new CellConstraints(7, 9));
final JPanel panelJtcy = new JPanel();
panelJtcy.setLayout(new FormLayout(new ColumnSpec[] {
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
FormFactory.DEFAULT_COLSPEC, FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("106dlu") }, new RowSpec[] {
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
new RowSpec("27dlu") }));
tabbedPane.addTab("家庭成员", null, panelJtcy, null);
final JLabel label_28 = new JLabel();
label_28.setText("姓名:");
panelJtcy.add(label_28, new CellConstraints(5, 3));
final JLabel label_29 = new JLabel();
label_29.setText("与本人关系:");
panelJtcy.add(label_29, new CellConstraints(5, 5));
Relation = new JTextField();
panelJtcy.add(Relation, new CellConstraints(7, 5));
final JLabel label_30 = new JLabel();
label_30.setText("电话:");
panelJtcy.add(label_30, new CellConstraints(5, 7));
Tel = new JTextField();
panelJtcy.add(Tel, new CellConstraints(7, 7));
final JLabel label_31 = new JLabel();
label_31.setText("所在单位:");
panelJtcy.add(label_31, new CellConstraints(5, 9));
Com = new JTextField();
panelJtcy.add(Com, new CellConstraints(7, 9));
final JLabel label_32 = new JLabel();
label_32.setText("备注:");
panelJtcy.add(label_32, new CellConstraints(5, 11));
Brief = new JTextField();
panelJtcy.add(Brief, new CellConstraints(7, 11, CellConstraints.FILL,
CellConstraints.FILL));
pName = new JTextField();
panelJtcy.add(pName, new CellConstraints(7, 3));
final JPanel panelJcjl = new JPanel();
panelJcjl.setLayout(new FormLayout(new ColumnSpec[] {
new ColumnSpec("35dlu"), FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("49dlu"), FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec("109dlu") }, new RowSpec[] {
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC, FormFactory.RELATED_GAP_ROWSPEC,
FormFactory.DEFAULT_ROWSPEC }));
tabbedPane.addTab("奖惩记录", null, panelJcjl, null);
final JLabel label_33 = new JLabel();
label_33.setText("类别:");
panelJcjl.add(label_33, new CellConstraints(3, 1));
// Sort = new JComboBox();
String[] kindSort = { "一等奖", "二等奖", "三等奖", "警告", "严重警告", "开除" };
Sort = new JComboBox(kindSort);
panelJcjl.add(Sort, new CellConstraints(5, 1));
final JLabel label_34 = new JLabel();
label_34.setText("事件:");
panelJcjl.add(label_34, new CellConstraints(3, 3));
final JLabel label_35 = new JLabel();
label_35.setText("处理部门:");
panelJcjl.add(label_35, new CellConstraints(3, 5));
final JLabel label_36 = new JLabel();
label_36.setText("处理时间:");
panelJcjl.add(label_36, new CellConstraints(3, 7));
final JLabel label_37 = new JLabel();
label_37.setText("处理结果:");
panelJcjl.add(label_37, new CellConstraints(3, 9));
Topic = new JTextField();
panelJcjl.add(Topic, new CellConstraints(5, 3));
mDep = new JTextField();
panelJcjl.add(mDep, new CellConstraints(5, 5));
Mdate = new JTextField();
panelJcjl.add(Mdate, new CellConstraints(5, 7));
Des = new JTextField();
panelJcjl.add(Des, new CellConstraints(5, 9));
final JLabel label_38 = new JLabel();
label_38.setText("一、");
panelJcjl.add(label_38, new CellConstraints());
final JLabel label_39 = new JLabel();
label_39.setText("二、");
panelJcjl.add(label_39, new CellConstraints(1, 11));
textField_4 = new JTextField();
textField_4.setEditable(false);
textField_4.setText("现只实现保存一项记录");
panelJcjl.add(textField_4, new CellConstraints(3, 11, 3, 1));
final JPanel panel_2 = new JPanel();
panel_2.setLayout(new FlowLayout());
getContentPane().add(panel_2, BorderLayout.SOUTH);
final JButton jButton1 = new JButton();
jButton1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
clearInfo(tabbedPane);// 使界面清空,并在左侧员工列表中插入一行
tmodel.addRow("", "");
//tmodel.setLeadSelectionIndex(table.getRowCount()-1);
table.updateUI();
}
});
jButton1.setText("新增");
panel_2.add(jButton1);
final JButton jButton2 = new JButton();
jButton2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
saveInfo(tabbedPane);
}
});
jButton2.setText("保存");
panel_2.add(jButton2);
final JButton jButton3 = new JButton();
jButton3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
delInfo(tabbedPane);
clearInfo(tabbedPane);
}
});
jButton3.setText("删除");
panel_2.add(jButton3);
final JButton jButton4 = new JButton();
jButton4.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
dispose();
}
});
jButton4.setText("返回");
panel_2.add(jButton4);
otherRefresh(tabbedPane);
//
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -