aspose file tools
The moose likes Beginning Java and the fly likes security password Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "security password" Watch "security password" New topic
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
    
    6

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:
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: security password
 
Similar Threads
Finding the location of a cell phone?
NT login - triggered by Java App
authenticating website users with mysql dbase
not able to read the mails
password text