Exercises
-
35.4 (Fill-in-the-Blanks) Fill in the blanks in each of the following statements:
A
JMenuItemthat is aJMenuis called a(n) .Method attaches a
JMenuBarto aJFrame.Container class has a default
BoxLayout.A(n) manages a set of child windows declared with class
JInternalFrame.
-
35.5 (True or False) State whether each of the following is true or false. If false, explain why.
Menus require a
JMenuBarobject so they can be attached to aJFrame.BoxLayoutis the default layout manager for aJFrame.JApplets can contain menus.
-
35.6 (Find the Code Errors) Find the error(s) in each of the following. Explain how to correct the error(s).
x.add(new JMenuItem(“Submenu Color”)); ...
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