char c = e.getKeyChar();
// as a coding convenience, create a reference to the text component
// that is typecast to JTextComponent. this is not essential, as we
// could typecast every reference, but this makes the code cleaner
JTextComponent _theComponent = (JTextComponent) DataTypeBoolean.this._textComponent;
String text = _theComponent.getText();
// let user enter T, t, Y, y, or 1 for true, and
// F, f, N, n, or 0 for false
if ("TtYy1".indexOf(c) > -1)
{