package a;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.sql.*;
public class ha extends JFrame {
private Connection conn=null;
private Statement stmt=null;
private ResultSet rs=null;
private final String URL="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=students";
private final String USER="sa";
private final String PASSWORD="sa";
public ha() {
try {
jbInit();
} catch (Exception ex) {
ex.printStackTrace();
}
}
public static void main(String[] args) {
ha javalogin=new ha();
}
private void jbInit() throws Exception {
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setVisible(true);
this.getContentPane().setLayout(null);
jButton1.setBounds(new Rectangle(42, 167, 128, 45));
jButton1.setText("登陆");
jButton1.addActionListener(new ha_jButton1_actionAdapter(this));
JUser.setBounds(new Rectangle(129, 36, 223, 25));
jLabel2.setText("密码:");
jLabel2.setBounds(new Rectangle(58, 78, 37, 51));
jLabel1.setText("用户名:");
jLabel1.setBounds(new Rectangle(48, 27, 46, 36));
jLabel3.setFont(new java.awt.Font("黑体", Font.PLAIN, 12));
jLabel3.setForeground(Color.red);
jLabel3.setText("数据库用户登陆初始状态:用户名:han密码:110 ");
jLabel3.setBounds(new Rectangle(13, 229, 387, 40));
JPass.setBounds(new Rectangle(128, 90, 223, 29));