Question

I have a java application that also has a login system implemented into it. On the login page I have a userName and password textfield, is there anyway for the textfield to not show the password when it is being typed, instead of it showing the text as it is being type, I want it to show a " * " for each letter/number, etc typed.

Thanks

Was it helpful?

Solution

Look into JPasswordField. Here's the Oracle docs: http://docs.oracle.com/javase/tutorial/uiswing/components/passwordfield.html.

OTHER TIPS

Use a JPassword Field. The syntax is this:

JPasswordField password = new JPasswordField("Default Text");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top