I have designed this Login page in JavaFX.
I want when I click on Eye button next to JFXPasswordField onPressed password should be shown in Text format in PasswordField itself.
And when I released mouse button i.e. Eye button release Password should be encoded in Black dots as normal.
In swing i achieved this using
to decode -
String password = String.valueOf(txtCurrentPassword.getPassword());
txtCurrentPassword.setText(password);
txtCurrentPassword.setEchoChar((char) 0);
And to encode -
txtCurrentPassword.setEchoChar('\u2022');
Please help me to achieve this Design code using JavaFX.