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