![](https://csdnimg.cn/release/download_crawler_static/87954968/bg4.jpg)
pan el.add(pwd);
this.setBoundsd 00,100,500,350);
this.setVisi ble(true);
this. setDefaultCloseOperation(J Frame. EXIT.ON.CLOSE)
;
}
public void actio nPerformed(Acti on Eve nt e)
{
if(e.getSource()==E nter)
{
String username , password;
username = name.getTextO;
password = pwd.getTextO; try
{
Class.forName
「
sun.jd bc.od bc.JdbcOd bcDriver");
}
catch (ClassNotFoundException ce)
{
JOpti on
Pane.showMessageDialog(ss,ce.getMessage());
}
if(stu.isSelectedO)
{
try
{
Connectio n
DriverMa nager.getC onn ectio n("jdbc:odbc:sysdb
con
")
Statement stmt = con.createStatementO;
ResultSet rs = stmt.executeQuery( select * from
STU
1
'); while(rs. next())
;
{