Events Flashcards
What model is the Java event system based on? Explain the model…
Delegation Model.
Event sources cause an event via changing some state within the program. An event listener then reacts as specified.
What are the 2 ways events are implemented?
Polling : Waiting for an indefinite amount of time in a loop for an event to occur via some condition.
Event driven : Create idle code that only executes when a certain event occurs.
What are the 3 components of the events framework?
Events : Change of state within the program.
Event Source : An object that generates a state change.
Event Listener : An object that responds to the event in a defined way.
Where do all event sources descend from?
Event Object class
Where do all event listeners descent from?
Event Listener interface