GUIs Flashcards
1
Q
What is an event driven language?
A
- Action/Interactions like button clicks or mouse presses will trigger an event
- Events are preprogramed blocks of code that will run when certain actions are performed
2
Q
What is the purpose of a layout manager?
A
Determines the locations of buttons and objects in the GUI
3
Q
How do you add layers of abstraction to a GUI?
A
Nesting layout managers in one another
4
Q
What is the purpose of the following listeners?
1. MouseListener
2. MouseMotionListener
3. ChangeListener
4. ActionListener
A
- MouseListener: Responds to mouse clicks
- MouseMotionListener: Responds to mouse movements
- ChangeListener: Responds to GUI check boxes
- ActionListener: Responds to GUI buttons and menu items
5
Q
Where can Inner classes be defined?
A
- Inside the scope of a class, but outside any methods
- Inside the scope of a class and inside of a method
6
Q
Which object is used to draw components on screen?
A
The “Graphics” object, often declared as “g”
7
Q
A