What I need to do is to prompt the user with a username and password (authentication is done locally) and if it checks out, the user would then be able to access the main pr
String userName = userNameTF.getText();
String userPassword = userPasswordPF.getText();
if(userName.equals("xian") && userPassword.equals("1234"))
{
JOptionPane.showMessageDialog(null,"Login successful!","Message",JOptionPane.INFORMATION_MESSAGE);
// place your main class here... example: new L7();
}
else
{
JOptionPane.showMessageDialog(null,"Invalid username and password","Message",JOptionPane.ERROR_MESSAGE);
userNameTF.setText("");
userPasswordPF.setText("");
}