EventObject class in java.util, AWTEvent class in java.awt

EventObject class: EventObject class in java.util is the super class for handling events. Constructor defined by EventObject class:

EventObject(Object src)

Methods defined by EventObject class:

getSource( ) method: It returns the source of the event.


Object getSource( )

toString( ) method: It returns string equivalent of an event.


String toString( )

AWTEvent class: AWTEvent class is a super class for AWT events. It is a sub class of EventObject class in java.awt. Method defined by AWTEvent class:

getID( ) method: It is used to return type of an event.


int getID( )

Leave a Reply