Hybrid View
-
17 Jul 2008 9:42 AM #1
How i make a mask for a TextField
How i make a mask for a TextField
like a JformattedTextField. Example phone : (##)####-####
ty for all
-
18 Jul 2008 8:00 AM #2
I second this. Anyone knows how to do masking?
-
18 Jul 2008 1:21 PM #3
I need this too and I'm working on releaseing a UX that will have this feature... simple to the Swing widget of the same name... hopefully in the next day or two
-
20 Jul 2008 6:17 PM #4
-
21 Jul 2008 12:09 PM #5
-
22 Jul 2008 3:46 AM #6
Not sure if this is what everyone wanted - turned out to be really simple.
You would use it like...Code:public class FormattedNumberField extends NumberField { @Override protected void onBlur(ComponentEvent be) { super.onBlur(be); setRawValue(getFormat().format(getValue().doubleValue())); } }
Code:FormattedNumberField annualsalary = new FormattedNumberField(); annualsalary.setFieldLabel("Annual Salary"); annualsalary.setFormat(NumberFormat.getCurrencyFormat()); panel.add(annualsalary);


Reply With Quote