java.awt.event.FocusEvent (JDK 1.1)
An event of this type indicates that a Component has gained or lost focus on a temporary or permanent basis.
Use the inherited getComponent() method to determine which component has gained or lost focus. Use getID() to determine the type of focus event; it returns FOCUS_GAINED or FOCUS_LOST.
When focus is lost, you can call isTemporary() to determine whether it is a temporary loss of focus. Temporary focus loss occurs when the window that contains the component loses focus, for example, or when focus is temporarily diverted to a popup menu or a scrollbar. Similarly, you can also use isTemporary() to determine whether focus is being granted to a component on a temporary basis.
public classFocusEventextends ComponentEvent { //Public ConstructorspublicFocusEvent(Componentsource, intid, booleantemporary); publicFocusEvent(Componentsource, intid); //Constantspublic static final intFOCUS_FIRST; public static final intFOCUS_GAINED; public static final intFOCUS_LAST; public static final intFOCUS_LOST; //Public Instance Methodspublic booleanisTemporary(); public StringparamString(); //Overrides ComponentEvent}
Hierarchy:
Object->EventObject(Serializable)->AWTEvent->ComponentEvent->FocusEvent
Passed To:
AWTEventMulticaster.focusGained(), AWTEventMulticaster.focusLost(), Component.processFocusEvent(), FocusAdapter.focusGained(), FocusAdapter.focusLost(), FocusListener.focusGained(), FocusListener.focusLost()