File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes security password Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
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: 19651
    
  18

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 - OCEEJBD 6
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: 11154
    
  16

I would think the way Rob suggested IS the easiest way.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

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://aspose.com/file-tools
 
subject: security password
 
Similar Threads
password text
not able to read the mails
NT login - triggered by Java App
authenticating website users with mysql dbase
Finding the location of a cell phone?