大学生社团信息管理系统(9)

2020-02-21 20:57

};

};

return false;

public bookTypeQMDIFrame() { }

private void initialize() { }

private JPanel getJContentPane() {

if (jContentPane == null) {

lbBookTypeDesc = new JLabel();

lbBookTypeDesc.setBounds(new Rectangle(8, 315, 67, 28)); lbBookTypeDesc.setText(\性别:\sexInput.setBounds(80, 315, 130, 26); brithday.setBounds(8, 355, 67, 28); brithInput.setBounds(80, 355, 130, 26); this.setBounds(new Rectangle(110, 20, 600, 580)); this.setTitle(\人员信息维护\this.setIconifiable(true); this.setClosable(true);

this.setContentPane(getJContentPane()); this.setVisible(true); super(); initialize();

address.setBounds(8, 390, 67, 28);

inputAdress.setBounds(80, 390, 130, 26); tel.setBounds(250, 315, 67, 28); inputTel.setBounds(335, 315, 130, 26); organization.setBounds(8, 432, 67, 28); organizationInput.setBounds(80, 432, 130, 26); position.setBounds(250, 355, 67, 28);

37

positionInput.setBounds(335, 355, 130, 26); Name = new JLabel();

Name.setBounds(new Rectangle(250, 280, 67, 28)); Name.setText(\姓名:\Id = new JLabel();

Id.setBounds(new Rectangle(7, 280, 68, 29)); Id.setText(\编号:\

lbSBookName = new JLabel();

lbSBookName.setBounds(new Rectangle(9, 58, 146, 25)); lbSBookName.setText(\请输入查询关键字:\lbTip = new JLabel(\人员信息查询\lbTip.setBounds(new Rectangle(0, 0, 600, 35)); lbTip.setFont(new Font(\黑体\jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(lbTip, null); jContentPane.add(lbSBookName, null);

jContentPane.add(getTxtSBookTypeName(), null); jContentPane.add(sexInput, null); jContentPane.add(brithday, null); jContentPane.add(brithInput, null); jContentPane.add(address, null); jContentPane.add(inputAdress, null); jContentPane.add(getBtnQuery(), null); jContentPane.add(getScroll(), null); jContentPane.add(Id, null);

jContentPane.add(getTxtBookTypeId(), null); jContentPane.add(Name, null);

jContentPane.add(getTxtBookTypeName(), null); jContentPane.add(lbBookTypeDesc, null);

38

}

}

jContentPane.add(tel, null); jContentPane.add(inputTel, null); jContentPane.add(organization, null); jContentPane.add(organizationInput, null); jContentPane.add(position, null); jContentPane.add(positionInput, null); jContentPane.add(getBtnModify(), null); jContentPane.add(getBtnDelete(), null);

return jContentPane;

private JTextField getTxtSBookTypeName() { }

if (txtSBookTypeName == null) { }

return txtSBookTypeName;

txtSBookTypeName = new JTextField();

txtSBookTypeName.setBounds(new Rectangle(161, 57, 148, 29));

private JButton getBtnQuery() {

if (btnQuery == null) {

btnQuery = new JButton();

btnQuery.setBounds(new Rectangle(350, 58, 67, 25)); btnQuery.setText(\查询\

btnQuery.addActionListener(new ActionListener(){

private peopleInformation peopleinformation;

public void actionPerformed(ActionEvent arg0) {

String name=txtSBookTypeName.getText().trim();

peopleInformation booktype=new peopleInformation(name); model.setDataVector(new bookTypeQMDIFrame().getDatas(booktype),

39

new bookTypeQMDIFrame().getTitles());

}

}

});

}

return btnQuery;

private JScrollPane getScroll() { }

private JTable getTable() {

if (table == null) {

table = new JTable();

table.getTableHeader().setReorderingAllowed(false); table.getTableHeader().setResizingAllowed(false); table.setModel(model);

model.setDataVector(this.getDatas(new peopleInformation()), this.getTitles()); table.addMouseListener(new MouseAdapter(){

public void mouseClicked(MouseEvent e) {

int selectedRow=table.getSelectedRow();

int bookTypeId=(Integer)table.getValueAt(selectedRow, 0); String bookTypeName=(String)table.getValueAt(selectedRow, 1); String sex=(String)table.getValueAt(selectedRow, 2); String brith=(String)table.getValueAt(selectedRow, 3); String address=(String)table.getValueAt(selectedRow, 4); String tel=(String)table.getValueAt(selectedRow, 5); String organization=(String)table.getValueAt(selectedRow, 6);

40

if (scroll == null) { }

return scroll;

scroll = new JScrollPane();

scroll.setBounds(new Rectangle(5, 100, 580, 157)); scroll.setViewportView(getTable());

}

}

});

}

String position=(String)table.getValueAt(selectedRow, 7); txtBookTypeId.setText(Integer.toString(bookTypeId)); txtBookTypeName.setText(bookTypeName); sexInput.setText(sex); brithInput.setText(brith);

organizationInput.setText(organization); positionInput.setText(position); inputAdress.setText(address); inputTel.setText(tel);

return table;

private Vector getTitles() {

Vector v=new Vector(); v.add(\编号\v.add(\姓名\v.add(\性别\v.add(\出生日期\v.add(\家庭住址\v.add(\联系电话\v.add(\所加社团\v.add(\社团职务\return v;

}

private Vector getDatas(peopleInformation peopleinformation) {

return new BookTypeDao().getDatas(peopleinformation);

41


大学生社团信息管理系统(9).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:小学数学

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: