Event Listener:
Within the program, a Java object can respond to an event. The object is known as the event Listener. The object which creates the event is known as Event Source.
A listener is an object which is notified whenever an event occurs. It has two main needs. First, it must have been registered along with one or more sources to receive notifications about specific types of events. And second, it must implement methods to receive and process these notifications.
The methods which receive and process events are defined in a set of interfaces found in java.awt.event. For instance, the MouseMotionListener interface declares two methods to receive notifications whenever the mouse is dragged or moved .Any object might receive and process one or both of these events if it gives an implementation of this interface