文档介绍://///////////////////////////////////////////////////////////////////////////////////////////////////用户登录/////////////////////////////////////////////////////////////////////////////////////////////////////.;;;;.*;;;;;;;;; lassuser_landextendsJFrameimplementsActionListener{ onnectionconn=null; staticStatementstat=null; staticResultSetrs=null; staticStringurl="jdbc:sqlserver://:1433;DatabaseName=_Property"; staticStringuser="sa"; staticStringpassword=""; JPanelp1,p2,p3,p4,p5; JLabellbl1,lbl2,lbl3,lbl4; JTextFieldtxt_name; JPasswordFieldtxt_pwd; JButtonbtn1,btn2,btn3; static{ try{ (""); }catch(Exceptione){ ("加载驱动失败"); (); } } publicuser_land(){ ("固定资产及设备用户登录"); p1=newJPanel(); p2=newJPanel(); p3=newJPanel(); p4=newJPanel(); p5=newJPanel(); lbl1=newJLabel("欢迎登录"); lbl2=newJLabel("用户名:"); lbl3=newJLabel("密码:"); lbl4=newJLabel(); txt_name=newJTextField(10); txt_pwd=newJPasswordField(10); btn1=newJButton("登录"); btn2=newJButton("清空"); btn3=newJButton("退出"); (lbl1); (lbl2); (txt_name); (lbl3); (txt_pwd); (btn1); (btn2); (btn3); (lbl4); (newGridLayout(5,1)); (p1); (p2); (p3); (p4); (p5); (400,300,400,300); (EXIT_ON_CLOSE); (true); //添加按钮登录事件 ( newActionListener(){ publicvoidactionPerformed(ActionEvente){ if((().equals("")==true)&&(().equals("")==false)) ("登录失败,用户名不能为空"); if((().equals("")==false)&&(txt