| Author |
security password
|
francis sumaylo
Greenhorn
Joined: Jul 11, 2010
Posts: 3
|
|
|
guys, is there anyone knows how to make sa secure input. example: you entered password you type "Password: Hello" but it will be shown as "Password: **** ".
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
In Swing check out JPasswordField.
On the console check out java.io.Console and its readPassword methods. Those will not show *s but nothing at all.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
francis sumaylo
Greenhorn
Joined: Jul 11, 2010
Posts: 3
|
|
|
thank you... is there easiest way? im just making a simple program with JOptionPane.showInputDialog(.....
|
 |
fred rosenberger
lowercase baba
Bartender
Joined: Oct 02, 2003
Posts: 9950
|
|
|
I would think the way Rob suggested IS the easiest way.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
JOptionPane can take complete JComponents as its message. You would need a bit more work, but it would still be quite easy:
|
 |
 |
|
|
subject: security password
|
|
|