Abstract Interface EventListener in Java

Abstract Interface EventListener in Java

In order for instances of a class to receive events, the class must implement the EventListener interface. It is a semantic interface, meaning that it declares no methods. Classes do not normally implement the EventListener interface directly, but instead, implement an interface that extends EventListener.

Prior to Java 1.1, events could only be delivered to AWT components. Java 1.1 introduces a new event model that allows events to be delivered to any object that implements a listener interface and registers to receive events from a particular source.

The structure of the interface EventListener is given by

public abstract interface java.util.EventListener {
}

Share and Enjoy !

See also  Class StringWriter in Java

Leave a Reply

Your email address will not be published. Required fields are marked *