How can a GUI component handle its own events | Eklavya Online

How can a GUI component handle its own events

A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.