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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: how to hidden text ?
jQuery in Action, 3rd edition