I have been researching on how I could have a preview of the key entered in a jPasswordField when pressing a JButton. But it turns out I can't find anything.
Could you tell me if you can, and if you can, how is it done?
I have been researching on how I could have a preview of the key entered in a jPasswordField when pressing a JButton. But it turns out I can't find anything.
Could you tell me if you can, and if you can, how is it done?
You have to use the setEchoChar() method . By passing the value 0 you indicate that you want to see the JPasswordField as if it were a JTextField
setEchoChar((char)0);