Submenus—One Last Feature A submenu is a menu that drops down from a menu item. See Figure 19.39. Figure 19.39 That’s right, menu items can be menus. Thus, if movies and cultMovies are both menus,...


Submenus—One Last Feature


A submenu is a menu that drops down from a menu item. See Figure 19.39.


Figure 19.39


That’s right, menu items can be menus. Thus, if movies and cultMovies are both menus, that is, both belong to JMenu , then movies.add(cultMovies) creates a submenu such as the one displayed in Figure 19.39. Theoretically, there is no limit to the level of nested menus. Of course, more than two or three levels may be somewhat excessive.


Create a frame with a Format menu containing two submenus Color and Font. Pick four colors for the menu items of the Color menu and three fonts for the Font menu. The application should initially display a label Test Me, in a default font, on a white background. The font and the background should change as the user makes menu selections.

Nov 16, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here