T10 - GUI Flashcards
Which object generates events? Which object processes events?
Event sources such as buttons generate events
Event listeners listens for when the event is generated
Event Handler processes the event
What is the difference between mouseClicked and mousePressed?
mouse button is pressed, mousePressed event occurs.
Mouse button is pressed
and then released, mouseClicked event occurs.
Explain the purpose of a GUI
AIM: provide a user interface
• Accepting and editing user inputs
• Produce outputs
• Meets user needs
Explain the difference between Event listener and Handler
Event Listener: Computer program that waits for an event to occur
Once an event is trigger the listener will notify the handler