In a jFrame im trying to verify if the user forget to write a password, but when i try to:
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
try {
char[] pass = jPass.getPassword();
if(pass.length == 0){
//continue with the proces
}
//or:
//if(pass == null)
} catch (Exception e) {
//some Warning
}
}
The program just CRASHES and i have to use the Task Manager from Windows to close it. How can i know if the user forgot to write his password?.
(YES, i wanna use a char[] because that how you have to use
getPassword()
)