The FocusEvent Class contains the following constructors:
FocusEvent(Component source, int id, Component other,boolean temporary)
FocusEvent(Component source, int id, Component other)
Creates a FocusEvent object by using the component that received the focus, the component that lost focus, the identifier of the focus event, and whether the focus event is temporary or permanent.
public FocusEvent(Component source, int id, Component other, boolean temporary);
source | The component that generates the event. |
other | The target component. |
id | The identifier of the focus event. This may be either FOCUS_LOST or FOCUS_GAINED.
If the identifier is FOCUS_GAINED, the other component is the component that loses focus. If the identifier is FOCUS_LOST, the other component is the component that gains focus. However, if the application is currently gaining or losing focus, the identifier may be null. |
temporary | Set to true if the focus change is a temporary one. Set to false if the focus change is a permanent one. |
Creates a FocusEvent object by using the component that received the focus, the component that lost focus, and the identifier of the focus event. A FocusEvent created with this constructor is permanent (by default).
public FocusEvent(Component source, int id, Component other);
source | The component that generates the event. |
other | The target component. |
id | The identifier of the focus event. This may be either FOCUS_LOST or FOCUS_GAINED.
If the identifier is FOCUS_GAINED, the other component is the component that loses focus. If the identifier is FOCUS_LOST, the other component is the component that gains focus. However, if the application is currently gaining or losing focus, the identifier may be null. |