This isn't a problem, just a curious question. I'm using the password text field in my gui and basically, this:
String pin = new String(passwordField.getPassword());
Person p = new Person();
p.setPassword(Integer.parseInt(pin));
leads to a number format error, despite that I didn't enter a text. But this:
String pin = new String(passwordField.getPassword());
int pn = Integer.parseInt(pin)
Person p = new Person();
p.setPassword(pn);
works. Why? Aren't they the same?