String usn = jTextField1.getText();
String pwd = new String (jPasswordField1.getPassword());
if (usn.equals("hayley") && pwd.equals("hello")) {new Home().setVisible(true);}
else {alert("Invalid Username / Password (LOGIN FAILED)");}
Please see the following code above. I have been receiving problems such as "illegal start of expression" and ')' expected whenever I run my system, even though I have already double-checked them and seen no problems with it. BTW, this was declared in the "Set Action..." function of Netbeans IDE.
Hoping for a positive response! :D