




已阅读5页,还剩42页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
目录 1系统登录界面系统登录界面 3 1 1 读者查询主界面读者查询主界面 6 1 1 1个人借阅查询界面 8 1 1 2库存期刊查询界面 10 1 1 3期刊去向查询界面 12 1 1 4修改密码界面 15 1 2 管理员主界面管理员主界面 18 1 2 1读者管理界面 20 1 2 1 1 添加用户界面 23 1 2 1 2 删除用户界面 26 1 2 1 3 修改用户界面 28 1 2 2期刊管理界面 31 1 2 2 1 添加期刊界面 34 1 2 2 2 删除期刊界面 37 1 2 2 3 库存期刊查询界面 40 1 2 2 4 期刊去向查询界面 42 1 2 3借阅管理界面 45 1 2 4修改密码界面 48 期刊管理系统期刊管理系统 系统实现系统实现 本系统用 Java 语言来实现 集成开发环境采用 JBuilder2008 数据库采用 MySql 1 系统登录界面 首先 有一个 系统登录 窗体 根据用户所输入的用户名来判断是读者还是管理员 并分别切换至 读者查询主界面 或 管理员主界面 图 1 系统登录界面 package cn edu hpu lq import java awt Font import java awt event ActionEvent import java awt event ActionListener import javax swing JButton import javax swing JFrame import javax swing JLabel import javax swing JPasswordField import javax swing JTextField public class LoginApplication private JFrame frame private final JLabel lbl login new JLabel private final JLabel lbl name new JLabel private final JLabel lbl password new JLabel private final JTextField textField new JTextField private final JPasswordField passwordField new JPasswordField private final JButton button new JButton private final JButton btn exit new JButton Launch the application param args public static void main String args try LoginApplication window new LoginApplication window frame setVisible true catch Exception e e printStackTrace Create the application public LoginApplication jbInit Initialize the contents of the frame private void jbInit frame new JFrame frame setTitle 期刊管理系统 frame getContentPane setLayout null frame setBounds 100 100 500 375 frame setDefaultCloseOperation JFrame EXIT ON CLOSE frame getContentPane add lbl login lbl login setFont new Font Font BOLD 22 lbl login setText 系统登录 lbl login setBounds 188 44 92 40 frame getContentPane add lbl name lbl name setText 用户名 lbl name setBounds 90 117 66 18 frame getContentPane add lbl password lbl password setText 密码 lbl password setBounds 103 158 53 18 frame getContentPane add textField textField setBounds 167 115 176 22 frame getContentPane add passwordField passwordField setBounds 167 156 176 22 frame getContentPane add button button setText 登录 button setBounds 98 231 106 28 frame getContentPane add btn exit btn exit addActionListener new Btn exitActionListener btn exit setText 退出 btn exit setBounds 232 231 106 28 private class Btn exitActionListener implements ActionListener public void actionPerformed ActionEvent e btn exit actionPerformed e protected void btn exit actionPerformed ActionEvent e System exit 0 1 1 读者查询主界面 图 2 读者查询主界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame public class ReaderFrame extends JFrame private final JButton button new JButton private final JButton button 1 new JButton private final JButton button 2 new JButton Launch the application param args public static void main String args try ReaderFrame frame new ReaderFrame frame setVisible true catch Exception e e printStackTrace Create the frame public ReaderFrame super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 读者查询 getContentPane add button button setText 个人借阅查询 button setBounds 135 77 147 28 getContentPane add button 1 button 1 setText 库存期刊查询 button 1 setBounds 135 147 147 28 getContentPane add button 2 button 2 setText 期刊去向查询 button 2 setBounds 135 216 147 28 1 1 1 个人借阅查询界面 图 3 个人借阅查询主界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame import javax swing JScrollPane import javax swing JTable import javax swing table DefaultTableModel public class 个人借阅查询 extends JFrame String columNames 用户名 期刊名 年份 期号 借出日 期 应还日期 Object data DefaultTableModel dtm new DefaultTableModel data columNames private final JTable table new JTable dtm private final JScrollPane scrollPane new JScrollPane private final JButton button new JButton Launch the application param args public static void main String args try 个人借阅查询 frame new 个人借阅查询 frame setVisible true catch Exception e e printStackTrace Create the frame public 个人借阅查询 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 个人借阅查询 getContentPane add scrollPane scrollPane setBounds 0 0 484 254 scrollPane setViewportView table getContentPane add button button setText 返回 button setBounds 89 276 106 28 1 1 2 库存期刊查询界面 图 4 库存期刊查询界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame import javax swing JScrollPane import javax swing JTable import javax swing table DefaultTableModel public class 库存期刊查询 extends JFrame String columNames CN刊号 期刊名 期刊年份 数量 Object data DefaultTableModel dtm new DefaultTableModel data columNames private final JTable table new JTable dtm private final JScrollPane scrollPane new JScrollPane private final JButton button new JButton Launch the application param args public static void main String args try 库存期刊查询 frame new 库存期刊查询 frame setVisible true catch Exception e e printStackTrace Create the frame public 库存期刊查询 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 库存期刊查询 getContentPane add scrollPane scrollPane setBounds 0 0 484 231 table hashCode scrollPane setViewportView table getContentPane add button button setText 返回 button setBounds 115 267 106 28 1 1 3 期刊去向查询界面 图 5 期刊去向查询 package cn edu hpu lq import javax swing JButton import javax swing JComboBox import javax swing JFrame import javax swing JLabel public class 期刊去向查询 extends JFrame private final JLabel label new JLabel private final JLabel label 1 new JLabel private final JLabel label 2 new JLabel private final JComboBox comboBox new JComboBox private final JComboBox comboBox 1 new JComboBox private final JComboBox comboBox 2 new JComboBox private final JButton button new JButton private final JButton button 1 new JButton Launch the application param args public static void main String args try 期刊去向查询 frame new 期刊去向查询 frame setVisible true catch Exception e e printStackTrace Create the frame public 期刊去向查询 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 期刊去向查询 getContentPane add label label setText 期刊名称 label setBounds 109 61 66 18 getContentPane add label 1 label 1 setText 期刊年份 label 1 setBounds 109 119 66 18 getContentPane add label 2 label 2 setText 期刊期号 label 2 setBounds 109 177 66 18 getContentPane add comboBox comboBox setBounds 217 57 142 27 getContentPane add comboBox 1 comboBox 1 setBounds 217 115 142 27 getContentPane add comboBox 2 comboBox 2 setBounds 217 173 142 27 getContentPane add button button setText 去向查询 button setBounds 109 240 106 28 getContentPane add button 1 button 1 setText 关闭 button 1 setBounds 253 240 106 28 1 1 4 修改密码界面 图 6 修改密码界面 package cn edu hpu lq import java awt event ActionEvent import java awt event ActionListener import javax swing JButton import javax swing JFrame import javax swing JLabel import javax swing JPasswordField public class ChangePassWordFrame extends JFrame private final JLabel lbl oldpwd new JLabel private final JLabel lbl newpwd new JLabel private final JLabel lbl confirmpwd new JLabel private final JPasswordField passwordField new JPasswordField private final JPasswordField passwordField 1 new JPasswordField private final JPasswordField passwordField 2 new JPasswordField private final JButton btn confirmButton new JButton private final JButton btn exit new JButton Launch the application param args public static void main String args try ChangePassWordFrame frame new ChangePassWordFrame frame setVisible true catch Exception e e printStackTrace Create the frame public ChangePassWordFrame super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 密码修改 getContentPane add lbl oldpwd lbl oldpwd setText 旧密码 lbl oldpwd setBounds 124 82 66 18 getContentPane add lbl newpwd lbl newpwd setText 新密码 lbl newpwd setBounds 124 135 66 18 getContentPane add lbl confirmpwd lbl confirmpwd setText 确认新密码 lbl confirmpwd setBounds 97 182 93 18 getContentPane add passwordField passwordField setBounds 196 80 157 22 getContentPane add passwordField 1 passwordField 1 setBounds 196 133 157 22 getContentPane add passwordField 2 passwordField 2 setBounds 196 180 157 22 getContentPane add btn confirmButton btn confirmButton addActionListener new Btn confirmButtonActionListener btn confirmButton setText 确定 btn confirmButton setBounds 119 250 106 28 getContentPane add btn exit btn exit addActionListener new Btn exitActionListener btn exit setText 退出 btn exit setBounds 247 250 106 28 private class Btn confirmButtonActionListener implements ActionListener public void actionPerformed ActionEvent e btn confirmButton actionPerformed e private class Btn exitActionListener implements ActionListener public void actionPerformed ActionEvent e btn exit actionPerformed e protected void btn confirmButton actionPerformed ActionEvent e protected void btn exit actionPerformed ActionEvent e System exit 0 1 2管理员主界面 图 7 管理员主界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame public class ManagerFrame extends JFrame private final JButton button new JButton private final JButton button 1 new JButton private final JButton button 2 new JButton Launch the application param args public static void main String args try ManagerFrame frame new ManagerFrame frame setVisible true catch Exception e e printStackTrace Create the frame public ManagerFrame super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 管理员查询 getContentPane add button button setText 读者管理 button setBounds 148 57 147 28 getContentPane add button 1 button 1 setText 期刊管理 button 1 setBounds 148 127 147 28 getContentPane add button 2 button 2 setText 借阅管理 button 2 setBounds 148 199 147 28 1 2 1 读者管理界面 图 8 读者管理界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame import javax swing JPanel import javax swing JScrollPane import javax swing JTable import javax swing table DefaultTableModel public class 读者管理 extends JFrame String columNames 用户名 密码 权限 Object data DefaultTableModel dtm new DefaultTableModel data columNames private final JTable table new JTable dtm private final JScrollPane scrollPane new JScrollPane private final JPanel panel new JPanel private final JButton button new JButton private final JButton button 1 new JButton private final JButton button 2 new JButton private final JButton button 3 new JButton Launch the application param args public static void main String args try 读者管理 frame new 读者管理 frame setVisible true catch Exception e e printStackTrace Create the frame public 读者管理 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 读者管理 getContentPane add scrollPane scrollPane setBounds 0 0 484 234 table hashCode scrollPane setViewportView table getContentPane add panel panel setBounds 0 265 484 42 panel add button button setText 添加用户 panel add button 1 button 1 setText 删除用户 panel add button 2 button 2 setText 修改用户 panel add button 3 button 3 setText 退出 1 2 1 1添加用户界面 图 9 添加用户界面 package cn edu hpu lq import javax swing ButtonGroup import javax swing JButton import javax swing JFrame import javax swing JLabel import javax swing JPasswordField import javax swing JRadioButton import javax swing JTextField public class 添加用户 extends JFrame private ButtonGroup buttonGroup new ButtonGroup private final JLabel label new JLabel private final JLabel label 1 new JLabel private final JTextField textField new JTextField private final JPasswordField passwordField new JPasswordField private final JRadioButton radioButton new JRadioButton private final JRadioButton radioButton 1 new JRadioButton private final JButton button new JButton private final JButton button 1 new JButton Launch the application param args public static void main String args try 添加用户 frame new 添加用户 frame setVisible true catch Exception e e printStackTrace Create the frame public 添加用户 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 添加用户 getContentPane add label label setText 用户名 label setBounds 108 68 66 18 getContentPane add label 1 label 1 setText 密码 label 1 setBounds 108 132 66 18 getContentPane add textField textField setBounds 178 66 147 22 getContentPane add passwordField passwordField setBounds 178 130 147 22 getContentPane add radioButton radioButton setSelected true buttonGroup add radioButton radioButton setText 读者 radioButton setBounds 147 195 66 26 getContentPane add radioButton 1 buttonGroup add radioButton 1 radioButton 1 setText 管理员 radioButton 1 setBounds 219 195 66 26 getContentPane add button button setText 添加 button setBounds 108 249 87 28 getContentPane add button 1 button 1 setText 退出 button 1 setBounds 244 249 81 28 1 2 1 2删除用户界面 图 10 删除用户界面 package cn edu hpu lq import javax swing JButton import javax swing JComboBox import javax swing JFrame import javax swing JLabel public class 删除用户 extends JFrame private final JLabel label new JLabel private final JComboBox comboBox new JComboBox private final JButton button new JButton private final JButton button 1 new JButton Launch the application param args public static void main String args try 删除用户 frame new 删除用户 frame setVisible true catch Exception e e printStackTrace Create the frame public 删除用户 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 删除用户 getContentPane add label label setText 用户名 label setBounds 79 93 66 18 getContentPane add comboBox comboBox setBounds 151 89 178 27 getContentPane add button button setText 删除用户 button setBounds 79 177 106 28 getContentPane add button 1 button 1 setText 退出 button 1 setBounds 223 177 106 28 1 2 1 3修改用户界面 图 11 修改用户界面 package cn edu hpu lq import javax swing ButtonGroup import javax swing JButton import javax swing JComboBox import javax swing JFrame import javax swing JLabel import javax swing JPasswordField import javax swing JRadioButton import javax swing JTextField public class 修改用户 extends JFrame private ButtonGroup buttonGroup new ButtonGroup private final JLabel label new JLabel private final JLabel label 1 new JLabel private final JPasswordField passwordField new JPasswordField private final JRadioButton radioButton new JRadioButton private final JRadioButton radioButton 1 new JRadioButton private final JButton button new JButton private final JButton button 1 new JButton private final JComboBox comboBox new JComboBox Launch the application param args public static void main String args try 修改用户 frame new 修改用户 frame setVisible true catch Exception e e printStackTrace Create the frame public 修改用户 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 修改用户 getContentPane add label label setText 用户名 label setBounds 108 68 66 18 getContentPane add label 1 label 1 setText 密码 label 1 setBounds 108 132 66 18 getContentPane add passwordField passwordField setBounds 178 130 147 22 getContentPane add radioButton radioButton setSelected true buttonGroup add radioButton radioButton setText 读者 radioButton setBounds 147 195 66 26 getContentPane add radioButton 1 buttonGroup add radioButton 1 radioButton 1 setText 管理员 radioButton 1 setBounds 219 195 66 26 getContentPane add button button setText 修改 button setBounds 108 249 87 28 getContentPane add button 1 button 1 setText 退出 button 1 setBounds 244 249 81 28 getContentPane add comboBox comboBox setBounds 180 64 145 27 1 2 2 期刊管理界面 图 12 期刊管理界面 package cn edu hpu lq import javax swing JButton import javax swing JFrame import javax swing JPanel import javax swing JScrollPane import javax swing JTable import javax swing table DefaultTableModel public class 期刊管理 extends JFrame String columNames 用户名 密码 权限 Object data DefaultTableModel dtm new DefaultTableModel data columNames private final JTable table new JTable dtm private final JScrollPane scrollPane new JScrollPane private final JPanel panel new JPanel private final JButton button new JButton private final JButton button 1 new JButton private final JButton button 2 new JButton private final JButton button 3 new JButton private final JButton button 4 new JButton Launch the application param args public static void main String args try 期刊管理 frame new 期刊管理 frame setVisible true catch Exception e e printStackTrace Create the frame public 期刊管理 super setBounds 100 100 500 375 setDefaultCloseOperation JFrame EXIT ON CLOSE try jbInit catch Throwable e e printStackTrace private void jbInit throws Exception getContentPane setLayout null setTitle 期刊管理 getContentPane add scrollPane scrollPane setBounds 0 0 484 234 table hashCode scrollPane setViewportView table getContentPane add panel panel setBounds 0 265 484 42 panel add button button setText 添加期刊 panel add button 1 button 1 setText 删除期刊 panel add button 2 button 2 setText 库存期刊查询 panel add button 4 button 4 setText 期刊去向查询 panel add button 3 button 3 setText 退出 1 2 2 1添加期刊界面 图 13 添加期刊界面 package cn edu hpu lq import javax swing ButtonGroup import javax swing JButton import javax swing JFrame import javax swing JLabel import javax swing
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 疟疾培训考试试题及答案
- 摄影单招考试真题及答案
- 策划招商考试试题及答案
- 高校产教融合实践中的学生综合素质评价体系构建
- 人本设计理念在老旧街区微更新中的实施
- 教师在虚拟教研室中的角色与发展路径
- 乐器介绍课件
- 乐博士奇妙管道课件
- 北京认购合同(标准版)
- 楼房加宽的申请报告(3篇)
- 胸外科围手术期呼吸功能锻炼的意义培训课件
- (新版)海南自由贸易港建设总体方案考试题库(含答案)
- 战现场急救技术教案
- 人教版新教材高中英语选择性必修一全册课文及翻译(中英word)
- 内蒙古电网介绍
- 气力输送计算
- 新北师大版七年级上册数学全册课件
- 公共关系学授课教案
- 河北省城市集中式饮用水水源保护区划分
- 可测试性设计
- 快速跑--弯道跑教案
评论
0/150
提交评论