Hi ! What would be the code in java to look my password in hidden?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi ! What would be the code in java to look my password in hidden?
Can you explain and post an example of what you are asking?
If you don't understand my answer, don't ignore it, ask a question.
I would like to know what is the code to hide the password
for example
My password is supercontra
and I want you to look ***********
Well u can have a look at this.
How to Use Password Fields (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Swing Components)
The JPasswordField has a method which is setEchoChar(). As documentation states:
Sets the echo character for this JPasswordField. ... Setting a value of 0 indicates that you wish to see the text as it is typed, similar to the behavior of a standard JTextField.
You can then use just a JPasswordField and enable the echo character (eg. '*') just for the password.
ăϻі†
josselynmedina95 (May 10th, 2014)