if (isFocusOwner()) {
InputContext inputContext = getInputContext();
if (inputContext != null) {
FocusEvent focusGainedEvent =
new FocusEvent(this, FocusEvent.FOCUS_GAINED);
inputContext.dispatchEvent(focusGainedEvent);
}
}
eventMask |= AWTEvent.INPUT_METHODS_ENABLED_MASK;
} else {