aspose file tools*
The moose likes Beginning Java and the fly likes how to get input without echo Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to get input without echo" Watch "how to get input without echo" New topic
Author

how to get input without echo

Albert Kam
Greenhorn

Joined: May 14, 2001
Posts: 6
hi dudes,
i need some help here. i want to get some input from users in console mode (not using gui), but i dont want to echo the chars they type. anybody knows how to do that ?
thanks ...
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Do you mean that you want to block out the letters that they type, like when you enter a password?
In a console you would not get the input from System.in until they pressed enter, so you would NOT get a chance to mess with it at all.
Consider a small JOptionPane using the showInputDialog and have the input go into a JPasswordField component.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Albert Kam
Greenhorn

Joined: May 14, 2001
Posts: 6
thanks Cindy !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get input without echo
 
Similar Threads
urgent: how to simulate getchar()
strange behavior - System.in/out
Javascript and PHP
telnet out put
JOptionPane password input