CHAPTER

33

Introducing Swing Menus

This chapter introduces another fundamental aspect of the Swing GUI environment: the menu. Menus form an integral part of many applications because they present the program’s functionality to the user. Because of their importance, Swing provides extensive support for menus. They are an area in which Swing’s power is readily apparent.

The Swing menu system supports several key elements, including

•  The menu bar, which is the main menu for an application.

•  The standard menu, which can contain either items to be selected or other menus (submenus).

•  The popup menu, which is usually activated by right-clicking the mouse.

•  The toolbar, which provides rapid access to program functionality, often paralleling ...

Get Java: The Complete Reference, Eleventh Edition, 11th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.