This is my first time to post:
The way I solved this problem was to extend the TextBox and create a new widget (It was because I had a promptTextBox, which I used for both password and textbox functions: the
original source was from turbomanage).
*note: because I'm using this as both a TextBox and PasswordTextBox, I added a Boolean isPassword to my constructor
1st I implement keypresshandler on the widget that extends the TextBox.
2nd onkeypress, I just store what they type into a
String called passwordString, and cancel the input, then insert another String called masked with the ASCII code for *.
I know of the old swap of label with textbox, but I don't like the solution because when you add styles, it kind shifts a little.
I don't know how good the solution is for security, so use it at your own risk.
Hope this helps.
Jay