0
Hey folks, could please help me set a password as hidden.
I need a java code
6 Respostas
+ 3
@Katharina, that may work on a comp, but not here on SL...
+ 1
You can. Use txtfield = new JPasswordField(); instead of txtfield = new JTextfield();
+ 1
That's right. My first example was for gui. If you want to have it on console input use the following, that should work, but I don't know if it works here on SL as well.
Console console = System.console();
String username = console.readLine("Username: ");
char[] password = console.readPassword("Password: ");
0
You mean a text field where you can write a text, shown as *******?
0
Thanks a lot, your trick is working. Thanks !
0
You're welcome!