You can limit or constrain the allowable input to a JFormattedTextField with a either a DocumentFilter or a custom Formatter. The Formatter can use a DocumentFilter and/or override the valueToString and stringToValue methods to achieve this. The java tutorial has an example of using a DocumentFilter. Another option is MaskFormatter which has methods that will restrict input.
Their achilles heel is the noogie! Give them noogies tiny ad!