String sql;
sql = "select * from login where username = ? and password = ?";
conn=MySqlConnect.ConnectDB();
try
{
pst = conn.prepareStatement(sql);
pst.setString(1, txtusername.getText());
pst.setString(2, txtpassword.getText());
rs = pst.executeQuery();
if (rs.next())
{
JOptionPane.showMessageDialog(null, "Username and Password correct");
enter code here
当我倾向于更改getText()时,它会在构建
时抛出错误