Replace StringOption texts with '*'
Hi,
I am using StringOptions as one of the fields for password input for a plugin, is there anyways to replace the inputs with '*' in the GUI?
Thanks,
Mark
0
-
Unfortunately you can't do that with a StringOption directly. The best option is to use JPasswordField as a custom component in your own subclass of Options like this:
class MyOptions extends Options {
JPasswordField passwordField;
MyOptions() {
passwordField = new JPasswordField();
addCustomComponent(passwordField);
}
String getPassword() {
return new String(passwordField.getPassword());
}
}0 -
It works! Thank you!
0
Please sign in to leave a comment.
Comments
2 comments