public class PasswordField extends Field { @Override protected String getLayoutText () { String ltext = text.get(); // we always want non-empty text so that we force ourselves to always have a text layer and // sane dimensions even if the text field contains no text if (ltext == null || ltext.length() == 0) { return " "; } StringBuffer r = new StringBuffer(); for (int a=0; a<ltext.length(); a++) { r.append("*"); } return r.toString(); } }
Welcome to my blog where occasional rants,
grumble and mumble about things in life expressed
as code ...
... essentially my cat /dev/null ... ^_^!!
Thursday, November 24, 2011
Little Password Text Widget ... TriplePlay
Hack around a little bit to get a little Password Text Widget from TriplePlay, again crude but works for me ...
Labels:
PlayN,
TriplePlay
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment