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

📄 bookreturnbean.java

📁 JAVA图书馆管理系统 sqlserver2000 + SWING + look and feel
💻 JAVA
字号:
package com.jlib.client;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.border.BevelBorder;

@SuppressWarnings("serial")
public class BookReturnBean extends JDialog {

	private JTextField textField_1;
	private JTextField textField;
	/**
	 * Launch the application
	 * @param args
	 */
	public static void main(String args[]) {
		
		try {
			UIManager.setLookAndFeel("com.nilo.plaf.nimrod.NimRODLookAndFeel");
		} catch (ClassNotFoundException e1) {
			// TODO 自动生成 catch 块
			e1.printStackTrace();
		} catch (InstantiationException e1) {
			// TODO 自动生成 catch 块
			e1.printStackTrace();
		} catch (IllegalAccessException e1) {
			// TODO 自动生成 catch 块
			e1.printStackTrace();
		} catch (UnsupportedLookAndFeelException e1) {
			// TODO 自动生成 catch 块
			e1.printStackTrace();
		}
		
		try {
			BookReturnBean dialog = new BookReturnBean();
			dialog.addWindowListener(new WindowAdapter() {
				public void windowClosing(WindowEvent e) {
					System.exit(0);
				}
			});
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog
	 */
	public BookReturnBean() {
		super();
		getContentPane().setLayout(null);
		setTitle("借阅/归还");
		setBounds(100, 100, 279, 176);

		final JLabel label = new JLabel();
		label.setText("读者ID:");
		label.setBounds(33, 10, 42, 22);
		getContentPane().add(label);

		textField = new JTextField();
		textField.setBorder(new BevelBorder(BevelBorder.LOWERED));
		textField.setBounds(81, 12, 142, 20);
		getContentPane().add(textField);

		final JLabel isbnLabel = new JLabel();
		isbnLabel.setText("ISBN:");
		isbnLabel.setBounds(33, 54, 30, 20);
		getContentPane().add(isbnLabel);

		textField_1 = new JTextField();
		textField_1.setBorder(new BevelBorder(BevelBorder.LOWERED));
		textField_1.setBounds(81, 55, 142, 20);
		getContentPane().add(textField_1);

		final JButton button = new JButton();
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			
				com.jlib.client.BookReturnFun bbf = new com.jlib.client.BookReturnFun();
				
				bbf.returnb(LoginBean.IP, LoginBean.PORT, textField.getText(), textField_1.getText());
				
				bbf.start();
				
			}
		});
		button.setText("归 还");
		button.setBounds(46, 105, 75, 23);
		getContentPane().add(button);

		final JButton button_1 = new JButton();
		button_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			
				com.jlib.client.BookReturnBean.this.setVisible(false);
				
			}
		});
		button_1.setText("取 消");
		button_1.setBounds(149, 105, 75, 23);
		getContentPane().add(button_1);
		//
	}

}

⌨️ 快捷键说明

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