I have put a Password Field on my frame. I have named it pwText(Variable name). I am unable to get the input from the Password Field so that I can do a comparison.
Please note that the password that need to be entered is "userjim".
I have put a Password Field on my frame. I have named it pwText(Variable name). I am unable to get the input from the Password Field so that I can do a comparison.
Please note that the password that need to be entered is "userjim".
String password = new String(pwText.getPassword());
if (password.equals("userjim") {
// correct
} else {
// not correct
}