java程序设计学生管理系统报告内容摘要:

new ActionListener() { public void actionPerformed(ActionEvent e) { dispose()。 (1)。 } })。 getContentPane().add(btnClose)。 } private void addBtnLoginActionListener() { String id = ()。 String password = new String(())。 if (()) { 精品文档 好文档 (this, 帐号不可为空 , 提示 , )。 return。 } else if (()) { (this, 密码不可为空 , 提示 , )。 return。 } else { tools t = new tools()。 boolean success = false。 // TODO:数据校验 success = (id, password)。 if (success) { // 如果数据校验成功 显示主界面 (this, 成功登录 , 提示 , )。 new mainView()。 ()。 } else { num。 if (num == 0) { (this, 用户名或者密码错误。 您没有机会了 )。 (0)。 } else { (this, 用户名或者密码错误。 您还有 + num+ 次机会 )。 } } } } public Dimension getPreferredSize() { return new Dimension(320, 170)。 } public void show() { Toolkit tk = ()。 Dimension screen = ()。 Dimension d = getSize()。 (( ) / 2,( ) / 2)。 // 输入密码后回车相当于点击了登录按钮 getRootPane().setDefaultButton(btnLogin)。 ()。 setDefaultCloseOperation(DISPOSE_ON_CLOSE)。 setSize(300, 220)。 精品文档 好文档 ()。 } public static void main(String[] args) { DButil util = new DButil()。 ()。 login loginFrame = new login()。 (true)。 } } 系统主界面详细设计 、运行效果图 图 登录后系统界面效果图 、主要代码 public mainView() { super()。 setTitle(所有学生信息 )。 setBounds(350, 150, 700, 400)。 setDefaultCloseOperation()。 setVisible(true)。 final JScrollPane scrollPane = new JScrollPane()。 con = ()。 Vector tableValueV, columnNameV。 // 存放列名 columnNameV = new Vector()。 (学号 )。 (名字 )。 (性别 )。 精品文档 好文档 (年龄 )。 tableValueV = new Vector()。 (table)。 final JPanel panel = new JPanel()。 getContentPane().add(panel, )。 (new JLabel(编号: ))。 aTextField = new JTextField(, 5)。 (aTextField)。 (new JLabel(姓名: ))。 bTextField = new JTextField(, 5)。 (bTextField)。 (new JLabel(性别: ))。 cTextField = new JTextField(, 5)。 (cTextField)。 (new JLabel(年龄: ))。 dTextField = new JTextField(, 5)。 (dTextField)。 } 学生信息增删改模块设计 、增加信息( 121,白娘子, M, 22)后运行效果图如下: 图 增加一个记录效果图 、主要代码 final JButton addButton = new JButton(添加 )。 (new ActionListener() { public void actionPerformed(ActionEvent e) { 精品文档 好文档 userDao add = new userDaoImpl()。 user u = new user()。 ((()))。 (())。 (())。 ((()))。 (u)。 setVisible(false)。 new mainView()。 } })。 (addButton)。 、删除信息编号为 120的学生信息后结果如下: 图 删除一个记录效果图 、主要代码: final JButton delButton =。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。