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

java学校图书借阅管理系统课程设计报告

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

4.3 新书入库模块设计

截图

源代码

class newbook extends JFrame implements ActionListener { {

setTitle(\新书入库\setLayout(null); setVisible(true); newbook()

JLabel f1,f2,f3,f4,f5,f6; JTextField t1,t2,t3,t4,t5,t6; JRadioButton radio1,radio2; ButtonGroup group1; JComboBox com; JButton Button1;

setBounds(50,50,300,400);

12

setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); f1=new JLabel(\图书编号:\f1.setBounds(20,20,100,20); f2=new JLabel(\图书名称:\f2.setBounds(20,50,100,20); f3=new JLabel(\出版社名称:\f3.setBounds(20,80,100,20); f4=new JLabel(\图书出版日期:\f4.setBounds(20,110,100,20); f5=new JLabel(\图书作者:\ f5.setBounds(20,140,100,20); f6=new JLabel(\图书入库总数:\f6.setBounds(20,170,100,20); t1=new JTextField(20); t1.setBounds(100,20,120,20); t2=new JTextField(20); t2.setBounds(100,50,120,20); t3=new JTextField(20); t3.setBounds(100,80,120,20); t4=new JTextField(20);

t4.setBounds(100,110,120,20); t5=new JTextField(20);

t5.setBounds(100,140,120,20); t6=new JTextField(20);

t6.setBounds(100,170,120,20); Button1=new JButton(\入库登记\Button1.addActionListener(this); Button1.setBounds(100,200,100,20); add(f1); add(t1); add(f2); add(t2); add(f3); add(t3); add(f4); add(t4); add(f5); add(t5); add(f6); add(t6); add(Button1); }

13

JOptionPane.showMessageDialog(this, \入库成功!\消息对话\WARNING_MESSAGE);

this.setVisible(false); }

try{Class.forName(\Connection

Statement stmt=con.createStatement(); String sql=\stmt.executeUpdate(sql); con.close();}

catch(Exception e1){ System.out.print(e1);}

public void actionPerformed(ActionEvent e) {String t11=t1.getText(); String t22=t2.getText(); String t33=t3.getText(); String t44=t4.getText(); String t55=t5.getText(); String t66=t6.getText();

con=DriverManager.getConnection(\

values('\

}

14

4.4 图书查询模块设计

截图

源代码

class bookcx extends JFrame implements ActionListener {

JLabel z0; JTextField x0; JButton button22; JTextArea Area; bookcx()

{

setTitle(\图书查询\

setLocation(20,30);

setLayout(null);

z0=new JLabel(\请输入您要查询的图书编号:\ z0.setBounds(100,20,160,20);

setSize(700,400);

add(z0);

x0=new JTextField(20);

x0.setBounds(270,20,80,20); add(x0);

button22=new JButton(\查询\

button22.setBounds(370,20,60,20); add(button22);

button22.addActionListener(this);

15

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