/**
* Inner class to act as document for validation
*/
- protected class WholeNumberDocument extends PlainDocument
+ protected static class WholeNumberDocument extends PlainDocument
{
/** Num digits to allow */
private int _maxDigits = 0;
*/
public WholeNumberField(int inMaxDigits)
{
- super("0");
+ super(inMaxDigits);
setDocument(new WholeNumberDocument(inMaxDigits));
}
return parseValue(getText());
}
+ /**
+ * @param inValue value to set
+ */
+ public void setValue(int inValue)
+ {
+ setText("" + inValue);
+ }
+
/**
* @param inText text to parse
* @return value as integer