Skip to content
Advertisement

Replacing the password character to dot in JPasswordField

The default password symbol of a JPasswordField is a dot.

enter image description here

But this will be replaced by Java Look and Feel to an asterisk.

enter image description here

Is there a way that I can replace this symbol to the dot back again after loading the Look and Feel ?

I already know that initializing or creating the JFrame object before loading the Look and Feel code does this, so please suggest some thing else like setEchoChar(char c).

Advertisement

Answer

enter image description here

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement