第一范文网 - 专业文章范例文档资料分享平台

大学生社团信息管理系统

来源:用户分享 时间:2025/7/24 6:22:21 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

}

this.setIconifiable(true); this.setClosable(true); this.setTitle(\添加新用户\

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

private JPanel getJContentPane() {

if (jContentPane == null) {

password = new JLabel(\密码:\password.setFont(new Font(\宋体\password.setBounds(new Rectangle(45, 130, 93, 34)); passwordTwo=new JLabel(\再次确认:\passwordTwo.setFont(new Font(\宋体\passwordTwo.setBounds(new Rectangle(36, 177, 150, 34)); name = new JLabel(\姓名:\name.setFont(new Font(\宋体\name.setBounds(new Rectangle(44, 83, 90, 29)); lbTip = new JLabel(\添加新用户\lbTip.setBounds(new Rectangle(0, 0, 500, 80)); lbTip.setForeground(Color.blue);

lbTip.setFont(new Font(\黑体\jContentPane = new JPanel(); jContentPane.setLayout(null); jContentPane.add(lbTip, null); jContentPane.add(name, null); jContentPane.add(passwordTwo, null);

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

jContentPane.add(getTxtBookTypeDesc(), null); jContentPane.add(getPasswordTwo(), null);

17

}

}

jContentPane.add(getBtnAdd(), null); jContentPane.add(getBtnCancel(), null);

return jContentPane;

private JTextField getPasswordTwo() { }

private JTextField getTxtBookTypeName() { }

private JTextField getTxtBookTypeDesc() { }

private JButton getBtnAdd() {

if (btnAdd == null) {

btnAdd = new JButton(\添加\

18

if (inputPasswordTwo == null) { }

return inputPasswordTwo;

inputPasswordTwo = new JPasswordField();

inputPasswordTwo.setBounds(new Rectangle(170, 177, 170, 25));

if (inputName == null) { }

return inputName;

inputName = new JTextField();

inputName.setBounds(new Rectangle(170, 83, 170, 25));

if (inputPassword == null) { }

return inputPassword;

inputPassword = new JPasswordField();

inputPassword.setBounds(new Rectangle(170, 130, 170, 25));

\

btnAdd.setFont(new Font(\宋体\btnAdd.setBounds(new Rectangle(120, 240,70, 30)); btnAdd.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent arg0) { String Name=inputName.getText().trim(); String Password=inputPassword.getText().trim(); String PasswordTwo=inputPasswordTwo.getText().trim(); if(StringUtil.isEmpty(Name)) { JOptionPane.showMessageDialog(null,\姓名不能为空!\ inputName.requestFocus(); return;

}

if(StringUtil.isEmpty(Password)) { JOptionPane.showMessageDialog(null,\密码不能为空!\ inputPassword.requestFocus(); return;

}

if(StringUtil.isEmpty(PasswordTwo)) {

JOptionPane.showMessageDialog(null,\请再次输入密码! inputPasswordTwo.requestFocus(); return;

}

if(Password.equals(PasswordTwo)) {

BookType bookType=new BookType(Name,Password);

int flag=new BookTypeDao().addBookType(bookType);

19

if(flag>0) {

JOptionPane.showMessageDialog(null, \添加成功!\inputName.setText(\inputPassword.setText(\inputPasswordTwo.setText(\inputName.requestFocus();

}else{ } } else{

JOptionPane.showMessageDialog(null, \两次密码输入不JOptionPane.showMessageDialog(null, \添加失败!\

一致,请重新输入!\

}

}

});

}

}

inputPassword.setText(\inputPasswordTwo.setText(\inputPassword.requestFocus(); return;

return btnAdd;

private JButton getBtnCancel() {

if (btnCancel == null) {

20

搜索更多关于: 大学生社团信息管理系统 的文档
大学生社团信息管理系统.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c9fo820256q2i4cx3q5al1oirv327pb00pmp_6.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top