Click here to Skip to main content
15,901,426 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to i access data entered in a jpasswordfield in order to validate the users ...
can you help me wth the
code for it....

What I have tried:

java
how to i access data entered in a jpasswordfield in order to validate the users ...
can you help me wth the
code for it....
Posted
Updated 5-Jul-16 20:29pm

1 solution

Use getPassword()[^] method.
You can capture the text entered by user using getPassword() by something like following-
C#
char[] inputString = passwordField.getPassword();

You can then validate by matching the inputString with your database value or whatever logic you want.

Hope, it helps.
In case your requirement is something else, please let me know :)
 
Share this answer
 
Comments
Pato Mbuguz 24-Aug-16 1:44am    
thnx its cool

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900