Creating a Menu Bar

  1. In the Component Palette, click an AWT or Swing menu bar component (MenuBar or JMenuBar).
  2. Click anywhere in the form to which you want to add the menu. The menu appears under the Other Components node in the Component Inspector because it cannot be manipulated by the layout manager.

    If this is the first menu bar you have added to the form, the menu bar also appears visually on the form.

Tip Only the AWT MenuBar can be used as the main menu for AWT forms, and only the Swing JMenuBar can be used as the main menu for Swing forms.
See also
Changing the Current 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

Legal Notices