///////////////////////////////////////////////////////////////////////////////////////////////////// 用户登录 ///////////////////////////////////////////////////////////////////////////////////////////////////// package com.newer.property; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.sql.*; import java.sql.Statement; import java.sql.ResultSet; import javax.swing.JButton; import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JPasswordField; import javax.swing.JPanel; import javax.swing.JFrame; public class user_land extends JFrame implements ActionListener{ static Connection conn=null; static Statement stat=null; static ResultSet rs=null; static String url="jdbc:sqlserver://127.0.0.1:1433;DatabaseName=_Property"; static String user="sa"; static String password=""; JPanel p1,p2,p3,p4,p5; JLabel lbl1,lbl2,lbl3,lbl4; JTextField txt_name; JPasswordField txt_pwd; JButton btn1,btn2,btn3; static{ try{ Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); }catch(Exception e){ System.out.println("加载驱动失败"); e.printStackTrace(); } } public user_land(){ this.setTitle("固定资产及设备用户登录"); p1=new JPanel(); p2=new JPanel(); p3=new JPanel(); p4=new JPanel(); p5=new JPanel(); lbl1=new JLabel("欢迎登录"); lbl2=new JLabel("用户名:"); lbl3=new JLabel("密 码:"); lbl4=new JLabel(); txt_name=new JTextField(10); txt_pwd=new JPasswordField(10); btn1=new JButton("登录"); btn2=new JButton("清空"); btn3=new JButton("退出"); p1.add(lbl1); p2.add(lbl2); p2.add(txt_name); p3.add(lbl3); p3.add(txt_pwd); p4.add(btn1); p4.add(btn2); p4.add(btn3); p5.add(lbl4); this.setLayout(new GridLayout(5,1)); this.add(p1); this.add(p2); this.add(p3); this.add(p4); this.add(p5); this.setBounds(400, 300, 400, 300); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.setVisible...