package database;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.*;
import javax.swing.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2007</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Frame1 extends JFrame {
JPanel contentPane;
JButton jButton1 = new JButton();
JLabel jLabel1 = new JLabel();
JPasswordField jPasswordField1 = new JPasswordField();
JLabel jLabel2 = new JLabel();
JLabel jLabel3 = new JLabel();
ResultSet rset;
Statement stmt;
Connection con;
public Frame1() {
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:stu",
"login",
"password");
Statement stmt = con.createStatement();
} catch(ClassNotFoundException e){System.out.println("hhhhhh");}
catch (SQLException e) {System.out.println("ggggggg");}
try {
//setDefaultCloseOperation(EXIT_ON_CLOSE);
jbInit();
} catch (Exception exception) {
System.out.println("asdfsdafsadf");
exception.printStackTrace();
}
}
/*Connection con = DriverManager.getConnection("jdbc:odbc:wombat","login",
"password");
Statement stmt = con.createStatement();*/
/**
* Component initialization.
*
* @throws java.lang.Exception
*/
private void jbInit() throws Exception {
contentPane = (JPanel) getContentPane();
contentPane.setLayout(null);
setSize(new Dimension(463, 421));
setTitle("Frame Title");
setSize(200, 300);
jButton1.setBackground(Color.black);
jButton1.setBounds(new Rectangle(154, 230, 104, 45));
jButton1.setFont(new java.awt.Font("宋体", Font.PLAIN, 20));
jButton1.setText("确认");
jButton1.addActionListener(new Frame1_jButton1_actionAdapter(this));
jLabel1.setFont(new java.awt.Font("楷体_GB2312", Font.PLAIN, 20));
jLabel1.setText("请输入密码");
jLabel1.setBounds(new Rectangle(19, 122, 115, 37));
jPasswordField1.setBounds(new Rectangle(154, 119, 234, 40));
jPasswordField1.addActionListener(new
Frame1_jPasswordField1_actionAdapter(this));
contentPane.setBackground(Color.lightGray);
jLabel2.setFont(new java.awt.Font("黑体", Font.PLAIN, 12));
jLabel2.setText("系统只限管理员登陆");
jLabel2.setBounds(new Rectangle(14, 22, 116, 32));
jLabel3.setFont(new java.awt.Font("黑体", Font.PLAIN, 12));
jLabel3.setText("登陆密码错误3次将退出");
jLabel3.setBounds(new Rectangle(14, 51, 135, 28));
contentPane.add(jPasswordField1);
contentPane.add(jButton1);
contentPane.add(jLabel1);
contentPane.add(jLabel2);
contentPane.add(jLabel3);
}
public void jButton1_actionPerformed(ActionEvent e) {
//if(jPasswordField1.getPassword()){}
}
public void jPasswordField1_actionPerformed(ActionEvent e) {
jPasswordField1.getPassword();
}
}
class Frame1_jPasswordField1_actionAdapter implements ActionListener {
private Frame1 adaptee;
Frame1_jPasswordField1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jPasswordField1_actionPerformed(e);
}
}
class Frame1_jButton1_actionAdapter implements ActionListener {
private Frame1 adaptee;
Frame1_jButton1_actionAdapter(Frame1 adaptee) {
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e);
}
}
图书馆管理系统 java语言实现 sql srever2000 功能完善 数据库已经备份使用方便
4星 · 超过85%的资源 需积分: 17 51 浏览量
2009-02-19
19:39:44
上传
评论
收藏 25KB RAR 举报
guisheng512
- 粉丝: 0
- 资源: 1
最新资源
- 常用工具集参考用于图像等数据处理
- 音乐展示网页、基于Stenography的图像数字水印添加与提取,以及基于颜色矩和Tamura算法的图像相似度评估算法py源码
- 基于EmguCV(OpenCV .net封装),图像数字水印加解密算法的实现,其中包含最低有效位算法,离散傅里叶变换算法+文档书
- 基于matlab+DWT的图像水印项目,数字水印+源代码+文档说明+图片+报告pdf
- (优秀毕业设计)基于python实现的数字图像可视化水印系统的设计与实现,多种数字算法实现+源代码+文档说明+理论演示pdf
- 基于DWT-DCT-SVD和deflate压缩的数字水印方法python源码+Gui界面+演示视频(高分毕业设计)
- 基于matlab实现DWT、DCT、SVD算法数字图像水印可视化系统+GUI界面+文档说明+详细注释(高分毕业设计)
- NCIAE-Data-Structure大一大二笔记
- 学习wireshark笔记
- digital-image-数据可视化笔记
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈