You can add multiple menu bars to a form, but only one can be the current menu bar. The current menu bar is displayed in the Form Designer and initially displayed when the form is run. You can write code to switch the current menu bar during runtime.
In the Form Editor, one menu bar can be active in the main form hierarchy and visible in the Form Designer pane. You can have other menu bars under the Other Components node of the Component Inspector.
To change the current menu bar in the Form Designer:
![]() |
A menu bar can be pasted only to JFrame, JDialog, or JApplet containers. |
See also | |
---|---|
Creating a Menu Bar
Adding a Menu to a Menu Bar Creating a Contextual Menu Adding a Menu Item Adding an Event Handler to a Menu Item |