Chapter 12 Flashcards
What listener is used for button generator
ActionListener interface
Button generates what events
action event
Windows generates what events
Windows events
Which listener is used for window event
WindowListener interface
What is listener interface
It listens to events
What are event generation steps
1- Create component which can generate events (e.g. button, windows, etc)
2- Build component (objects) that can handle events (Event handlers)
3- Register handlers with generators
What is inheritance nature of classes in Java
A class can inherit one class only, but a class inherit multiple interfaces
Which are 2 types of listener interface for mouse events
1- MouseListener
2- MouseMotionListener
What are 5 events for mouselistener interface
1- clicked 2- Pressed 3- released 4- entered 5- exited
What listener is used for key events
KeyListener interface