云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 大学生社团信息管理系统

大学生社团信息管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/5/6 12:34:12

}

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

搜索更多关于: 大学生社团信息管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

} 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.s

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com