It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes how to hidden text ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to hidden text ?" Watch "how to hidden text ?" New topic

how to hidden text ?

Simon Xu
Ranch Hand

Joined: Aug 16, 2000
Posts: 235
how to make text in TextField hidden? like JPasswordField in Swing.
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi simon,

u can use setEchochar method of text field for this purpose.

public void setEchoChar(char c)
Sets the echo character for this text field.
An echo character is useful for text fields where user input should not be echoed to the screen, as in the case of a text field for entering a password. Setting echoChar = 0 allows user input to be echoed to the screen again.

I agree. Here's the link:
subject: how to hidden text ?
It's not a secret anymore!