Java in a Nutshell

Previous Chapter 20
The java.awt.event Package
Next
 

20.13 java.awt.event.FocusListener (JDK 1.1)

This interface defines the methods that an object must implement to "listen" for focus events on AWT components. When a FocusEvent occurs, an AWT component notifies its registered FocusListener objects by invoking one of their methods.

An easy way to implement this interface is by subclassing the FocusAdapter class.

public abstract interface FocusListener extends EventListener {
    // Public Instance Methods
            public abstract void focusGained(FocusEvent e);
            public abstract void focusLost(FocusEvent e);
}

Implemented By:

AWTEventMulticaster, FocusAdapter

Passed To:

AWTEventMulticaster.add(), AWTEventMulticaster.remove(), Component.addFocusListener(), Component.removeFocusListener()

Returned By:

AWTEventMulticaster.add(), AWTEventMulticaster.remove()


Previous Home Next
java.awt.event.FocusEvent (JDK 1.1) Book Index java.awt.event.InputEvent (JDK 1.1)

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java