java.awt.event
Interface FocusListener

All Superinterfaces:
EventListener
All Known Implementing Classes:
AWTEventMulticaster, BasicButtonListener, BasicComboBoxEditor, BasicComboBoxEditor.UIResource, BasicComboBoxUI.FocusHandler, BasicListUI.FocusHandler, BasicSliderUI.FocusHandler, BasicSplitPaneUI.FocusHandler, BasicTabbedPaneUI.FocusHandler, BasicTableUI.FocusHandler, BasicTextUI.BasicCaret, BasicToolBarUI.ToolBarFocusListener, BasicTreeUI.FocusHandler, Component.AccessibleAWTComponent.AccessibleAWTFocusHandler, DefaultCaret, FocusAdapter, JComponent.AccessibleJComponent.AccessibleFocusHandler, MetalComboBoxEditor, MetalComboBoxEditor.UIResource

public interface FocusListener
extends EventListener

This interface is for classes that wish to be notified of changes of keyboard focus for a component. To watch a subset of these events, use a FocusAdapter.

Since:
1.1
See Also:
FocusAdapter, FocusEvent

Method Summary
 void focusGained(FocusEvent event)
          This method is called when a component gains the keyboard focus.
 void focusLost(FocusEvent event)
          This method is invoked when a component loses the keyboard focus.
 

Method Detail

focusGained

void focusGained(FocusEvent event)
This method is called when a component gains the keyboard focus.

Parameters:
event - the FocusEvent indicating that focus was gained

focusLost

void focusLost(FocusEvent event)
This method is invoked when a component loses the keyboard focus.

Parameters:
event - the FocusEvent indicating that focus was lost