| |
e811. Creating a Popup Menu with Nested Menus
See e810 Creating a Popup Menu for an example on how
to display a popup menu.
final JPopupMenu popupMenu = new JPopupMenu();
// Create a submenu with items
JMenu submenu = new JMenu("SubMenu1");
submenu.add(action1);
submenu.add(action2);
// Add submenu to popup menu
popupMenu.add(submenu);
e808.
Creating a JMenuBar, JMenu, and JMenuItem Component
e809.
Separating Menu Items in a Menu
e810.
Creating a Popup Menu
e812.
Forcing a Popup Menu to Be a Heavyweight Component
e813.
Getting the Currently Selected Menu or Menu Item
e814.
Creating a Menu Item That Listens for Changes to Its Selection Status
e815.
Listening for Changes to the Currently Selected Menu or Menu Item
© 2002 Addison-Wesley.
|