⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookmatainframe.java

📁 本系统的设计模拟一般学校特别是高校的图书借阅管理内容
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * Copyright (c) 2006 guodongping. All  Rights Reserved. *  * E-mail: yayajike_0305@163.com * QQ:     445938759 *///package library;import java.awt.Dimension;import java.awt.Rectangle;import javax.swing.JPanel;import java.awt.GridLayout;import javax.swing.JTextField;import java.awt.Insets;import java.awt.GridBagConstraints;import javax.swing.JButton;import javax.swing.JLabel;import java.awt.GridBagLayout;import java.awt.BorderLayout;import java.sql.Connection;import java.sql.ResultSet;import java.sql.SQLException;import javax.swing.JComboBox;import javax.swing.DefaultComboBoxModel;import javax.swing.ComboBoxModel;import javax.swing.JOptionPane;import java.awt.event.ActionListener;import java.awt.event.ActionEvent;/*** This code was generated using CloudGarden's Jigloo* SWT/Swing GUI Builder, which is free for non-commercial* use. If Jigloo is being used commercially (ie, by a corporation,* company or business for any purpose whatever) then you* should purchase a license for each developer using Jigloo.* Please visit www.cloudgarden.com for details.* Use of Jigloo implies acceptance of these licensing terms.* ************************************** A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED* for this machine, so Jigloo or this code cannot be used legally* for any corporate or commercial purpose.* **************************************//** * @author guodongping * 创建日期 2006-1-15 * 程序主界面 */public class BookMatainFrame extends javax.swing.JInternalFrame {	private JPanel jPanel1;	private JLabel outLabel;	private JButton refreshButton;	private JLabel jLabel4;	private JTextField yearText;	private JTextField pressText;	private JComboBox statusText;	private JTextField nameText;	private JTextField idText;	private JLabel jLabel7;	private JLabel jLabel6;	private JLabel jLabel5;	private JLabel jLabel3;	private JButton closeButton;	private JButton deleteButton;	private JButton modifyButton;	private JButton addButton;	private JButton skimButton;	private JButton lastButton;	private JButton nextButton;	private JButton preButton;	private JButton firstButton;	private JLabel jLabel2;	private JLabel jLabel1;	private JLabel avaiLabel;	private JPanel jPanel4;	private JPanel jPanel3;	private JPanel jPanel2;	private String sqlCommand;	private ResultSet rs;	private Bridge bridge = new Bridge();	private DbManage manage = new DbManage();	private int available = 0, out = 0;	public BookMatainFrame() {		super( "图书维护",true,true,true,true );		initGUI();	}		private void initGUI() {		try {			setPreferredSize(new Dimension(400, 300));			setBounds(new Rectangle(0, 0, 400, 300));			setVisible(true);			{				jPanel1 = new JPanel();				BorderLayout jPanel1Layout = new BorderLayout();				this.getContentPane().add(jPanel1, BorderLayout.CENTER);				jPanel1.setLayout(jPanel1Layout);				{					jPanel3 = new JPanel();					GridBagLayout jPanel3Layout = new GridBagLayout();					jPanel3Layout.columnWidths = new int[] {4,7};					jPanel3Layout.rowHeights = new int[] {7,7,7,7,7};					jPanel3Layout.columnWeights = new double[] {0.05,0.1};					jPanel3Layout.rowWeights = new double[] {0.1,0.1,0.1,0.1,0.1};					jPanel1.add(jPanel3, BorderLayout.CENTER);					jPanel3.setLayout(jPanel3Layout);					{						jLabel3 = new JLabel();						jPanel3.add(jLabel3, new GridBagConstraints(							0,							0,							1,							1,							0.0,							0.0,							GridBagConstraints.CENTER,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						jLabel3.setText("书号:");					}					{						jLabel4 = new JLabel();						jPanel3.add(jLabel4, new GridBagConstraints(							0,							1,							1,							1,							0.0,							0.0,							GridBagConstraints.CENTER,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						jLabel4.setText("书名:");					}					{						jLabel5 = new JLabel();						jPanel3.add(jLabel5, new GridBagConstraints(							0,							2,							1,							1,							0.0,							0.0,							GridBagConstraints.CENTER,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						jLabel5.setText("状态:");					}					{						jLabel6 = new JLabel();						jPanel3.add(jLabel6, new GridBagConstraints(							0,							3,							1,							1,							0.0,							0.0,							GridBagConstraints.CENTER,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						jLabel6.setText("出版社:");					}					{						jLabel7 = new JLabel();						jPanel3.add(jLabel7, new GridBagConstraints(							0,							4,							1,							1,							0.0,							0.0,							GridBagConstraints.CENTER,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						jLabel7.setText("出版时间:");					}					{						idText = new JTextField(10);						jPanel3.add(idText, new GridBagConstraints(							1,							0,							1,							1,							0.0,							0.0,							GridBagConstraints.WEST,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));					}					{						nameText = new JTextField(10);						jPanel3.add(nameText, new GridBagConstraints(							1,							1,							1,							1,							0.0,							0.0,							GridBagConstraints.WEST,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));					}					{						ComboBoxModel statusTextModel = new DefaultComboBoxModel(							new String[] { "1", "0" });						statusText = new JComboBox();						jPanel3.add(statusText, new GridBagConstraints(							1,							2,							1,							1,							0.0,							0.0,							GridBagConstraints.WEST,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));						statusText.setModel(statusTextModel);					}					{						pressText = new JTextField(10);						jPanel3.add(pressText, new GridBagConstraints(							1,							3,							1,							1,							0.0,							0.0,							GridBagConstraints.WEST,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));					}					{						yearText = new JTextField(10);						jPanel3.add(yearText, new GridBagConstraints(							1,							4,							1,							1,							0.0,							0.0,							GridBagConstraints.WEST,							GridBagConstraints.NONE,							new Insets(0, 0, 0, 0),							0,							0));					}				}				{					jPanel4 = new JPanel();					jPanel1.add(jPanel4, BorderLayout.SOUTH);					{						avaiLabel = new JLabel();						jPanel4.add(avaiLabel);					}					{						jLabel1 = new JLabel();						jPanel4.add(jLabel1);						jLabel1.setText("本可借,");					}					{						outLabel = new JLabel();						jPanel4.add(outLabel);					}					{						jLabel2 = new JLabel();						jPanel4.add(jLabel2);						jLabel2.setText("本借出");					}				}			}			{				jPanel2 = new JPanel();				GridLayout jPanel2Layout = new GridLayout(2, 5);				jPanel2Layout.setColumns(5);				jPanel2Layout.setRows(2);				this.getContentPane().add(jPanel2, BorderLayout.SOUTH);				jPanel2.setLayout(jPanel2Layout);				{					firstButton = new JButton();					jPanel2.add(firstButton);					firstButton.setText("第一");					firstButton.addActionListener(new ActionListener() {						public void actionPerformed(ActionEvent evt) {							firstPressed();							//TODO add your code for firstButton.actionPerformed						}					});				}				{					preButton = new JButton();					jPanel2.add(preButton);					preButton.setText("上一");					preButton.addActionListener(new ActionListener() {						public void actionPerformed(ActionEvent evt) {							prePressed();;							//TODO add your code for preButton.actionPerformed						}					});				}				{					nextButton = new JButton();					jPanel2.add(nextButton);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -