I'm using JPassword and KeyReleased event, when a key is pressed as "ctrl" and in the event I ask with getPassword for the first digit of the password, ctrl does not generate a character, it generates an exception java.lang. ArrayIndexOutOfBoundsException.
I tried with the following instruction to avoid the exception and worked out, but in the temp var (that is char type) didn't save anything
try
{
temp=Password.getPassword()[n];
}
catch (ArrayIndexOutOfBoundsException e){}
How can I avoid the exception ?
what do I save in temp when I press ctrl ó Alt??
How can I ask if temp var is null?
Thanks you