Java AWT

Previous Chapter 21
java.awt.event Reference
Next
 

FocusListener (New)

Name

FocusListener (New)

[Graphic: Figure from the text]

Description

Objects that implement the FocusListener interface can receive FocusEvent objects. Listeners must first register themselves with objects that produce events. When events occur, they are then automatically propagated to all registered listeners.

Interface Definition

public abstract interface java.awt.event.FocusListener
   extends java.util.EventListener {
  // Instance Methods
  public abstract void focusGained (FocusEvent e);
  public abstract void focusLost (FocusEvent e);
}

Interface Methods

focusGained

public abstract void focusGained (FocusEvent e)

Parameters

e

The component event that occurred.

Description

Notifies the FocusListener that a component gained the input focus.

focusLost

public abstract void focusLost (FocusEvent e)

Parameters

e

The component event that occurred.

Description

Notifies the FocusListener that a component lost the input focus.

See Also

AWTEventMulticaster, EventListener, FocusAdapter, FocusEvent


Previous Home Next
FocusEvent (New) Book Index InputEvent (New)

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