Self-Review Exercises
22.1 Fill in the blanks in each of the following statements:
a) The _________ class is used to create a menu object.
b) The _________ method of class JMenu places a separator bar in a menu.
c) JSlider events are handled by the _________ method of interface _________.
d) The GridBagConstraints instance variable _________ is set to CENTER by default.
22.2 State whether each of the following is true or false. If false, explain why.
a) When the programmer creates a JFrame, a minimum of one menu must be created and added to the JFrame.
b) The variable fill belongs to the GridBagLayout class.
c) Drawing on a GUI component is performed with respect to the (0, 0) upper-left corner coordinate of the component.
d) The default layout ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access