0

Hi, i am a beginner in java. i have to put two text fields in my form, one for username and the other for password. i want the password text box to hide input when user types in it.
Can someone please tell how can i do that in java, at the moment my form takes both input as simple text fields.

regards,
nemo

5
Contributors
5
Replies
12
Views
10 Years
Discussion Span
Last Post by almasalkhi
-1

Hi, i am a beginner in java. i have to put two text fields in my form, one for username and the other for password. i want the password text box to hide input when user types in it.
Can someone please tell how can i do that in java, at the moment my form takes both input as simple text fields.

regards,
nemo

instead of jtextfield you must use jpasswordfield...
then use all methods just as a jtextfield ..


simple...

Votes + Comments
Not helpful, bad explanation
0

use the swing JPasswordField , which is a class in Swing Library.
Also please get hold of the downloadable library API DOCs from the sun java site, that would be a great help
enjoy

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.