Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Wednesday, August 04, 2004

Validation bliss

NumberCleaner's great: it leaves the good stuff and the bad stuff untouched (so the validators can have at them), but it helps out the in-between stuff because it's transient anyway.

private ValidatingTextField angleToleranceTextField = new ValidatingTextField(
"", 5, SwingConstants.RIGHT,
new ValidatingTextField.CompositeValidator(
new ValidatingTextField.Validator[] {
new ValidatingTextField.BoundedDoubleValidator(0,
false, 180, false) }),
new FUTURE_ValidatingTextField.NumberCleaner("22.5"));


Post a Comment

<< Home