new SQL();
Statement st;//向数据库发送sql语句
try
{
st=SQL.conn.createStatement();
String s="select * from Login where 姓名='"+zkzh+"' and 密码='"+xm+"' and 考试地点='"+ksdd+"' and 登录身份='"+dlsf+"' ";
ResultSet rs=st.executeQuery(s);
if(rs.next())
{
System.out.println(dlsf);
//if(dlsf==1)
JOptionPane.showMessageDialog(null,"欢迎管理员进入考试系统!");
new Administratormenu();
f.setVisible(false);
}
else
{
JOptionPane.showMessageDialog(null,"仔细一点哦,密码错了");
t2.setText("");
t3.setText("");
}
}
catch(Exception e3)
{
JOptionPane.showMessageDialog(null,"登录查询数据库出现异常!");
}
}
}
public void windowClosing(WindowEvent e)
{
((Frame) e.getComponent()).dispose();
System.exit(0);
}
public static void main(String args[])
{
new Login();
}
}