Frage

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

War es hilfreich?

Lösung

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

Andere Tipps

Use a JPassword Field. The syntax is this:

JPasswordField password = new JPasswordField("Default Text");
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top