This applet shows use of a TextListener to ensure that all characters in a textfield are valid, in this case valid Hex digits.