Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

password

 
brian yuen
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me how to hide the information then I type
like

when i typing it, the screen will not display what typed..
 
chris czinder
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
You might want to look at the Api, and checkout PasswordCallback. It has the ability to set it so the Password isn't echoed back. Look into it at
API.
Hope that helps
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java doesn't offer that kind of control over the console interface, unfortunately. You're better off throwing up a GUI window; then it's easy to use, for example, javax.swing.JPasswordField.
I don't think the PasswordCallback suggestion will help you.
 
brian yuen
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys , I found a web that can helps
http://java.sun.com/features/2002/09/pword_mask.html
 
brian yuen
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys , I found a web that can helps
password
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic