0

Hey folks, could please help me set a password as hidden.

I need a java code

29th Aug 2017, 8:31 PM
Fabrix
Fabrix - avatar
6 odpowiedzi
+ 3
@Katharina, that may work on a comp, but not here on SL...
30th Aug 2017, 2:44 PM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar
+ 1
You can. Use txtfield = new JPasswordField(); instead of txtfield = new JTextfield();
30th Aug 2017, 2:43 PM
Katharina
+ 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: ");
30th Aug 2017, 2:47 PM
Katharina
0
You mean a text field where you can write a text, shown as *******?
30th Aug 2017, 10:57 AM
Katharina
0
Thanks a lot, your trick is working. Thanks !
31st Aug 2017, 5:59 PM
Fabrix
Fabrix - avatar
0
You're welcome!
31st Aug 2017, 6:10 PM
Katharina