Use
getPassword()[
^] method.
You can capture the text entered by user using
getPassword() by something like following-
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 :)