图书预约系统代码java 图书馆预约系统类图

求一个java图书管管理软件登陆界面系统代码package pack_view;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.FocusEvent;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.WindowEvent;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.plaf.multi.MultiLookAndFeel;
import pack_DB.DB;
public class Login extends JFrame{
/**
* 登陆界面
*/
private static final long serialVersionUID = 1L;
JFrame jf = new JFrame();
private JPanel panel_all ;
private JPanel panel1 = new JPanel();
private JPanel panel2= new JPanel();
private JPanel panel3 = new JPanel();
private JPanel panel4 = new JPanel();
private JLabel jLabel_title;
private JLabel jLabel_name = new JLabel();
private JLabel jLabel_password = new JLabel();
private JTextField jTextField_name = new JTextField(15);
private JPasswordField jPasswordField = new JPasswordField(15);
private JButton jb1 = new JButton();
private JButton jb2 = new JButton();
private Font font;
String cid="";
String passwd ="";
//加载背景图片
//private ImageIcon imageicon;
//private Image image;
public Login() {
jf.setTitle("客户端登陆");
jf.setSize(350, 300);
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();//把用户的显示器屏幕的尺寸(长和宽)赋值给变量screenSize
Dimension frameSize = jf.getSize();
if (frameSize.heightscreenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.widthscreenSize.width) {
frameSize.width = screenSize.width;
}
//把弹出的对话框窗口放置在屏幕中间
jf.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
//imageicon = new ImageIcon(ClassLoader
//.getSystemResource("res/backgound.jpg".toString()));
panel_all =new JPanel(){
public void paintComponent(Graphics g){
super.paintComponents(g);
//image = imageicon.getImage();
//if(image != null)
//g.drawImage(image,0,0,getWidth(),getHeight(),this);
}
};
font=new Font("宋体正文", 0,20);
jLabel_title = new JLabel(new ImageIcon(ClassLoader
.getSystemResource("res/Login.jpg".toString())));
jLabel_title.setFont(font);
jLabel_title.setText("用户登陆");
jLabel_name.setFont(new java.awt.Font("Dialog", 0, 14));
jLabel_name.setText("用户名:");
jLabel_password.setFont(new java.awt.Font("Dialog", 0, 14));
jLabel_password.setText("密码:");
jb1.setFont(new java.awt.Font("Dialog", 0, 18));
jb1.setText("确认");
jb2.setText("取消");
jb2.setFont(new java.awt.Font("Dialog", 0, 18));
jTextField_name.addKeyListener(new KeyAdapter()
{
public void keyPressed(KeyEvent e)
{
if(e.getKeyCode()==KeyEvent.VK_ENTER)
{
jb1.doClick();
}
}});
jPasswordField.addKeyListener(new KeyAdapter()
{
public void keyPressed(KeyEvent e)

推荐阅读