Class MenuBar

java.lang.Object
All Implemented Interfaces:
Styleable, EventTarget, Skinnable

@DefaultProperty("menus") public class MenuBar extends Control

A MenuBar control traditionally is placed at the very top of the user interface, and embedded within it are Menus. To add a menu to a menubar, you add it to the menus ObservableList. By default, for each menu added to the menubar, it will be represented as a button with the Menu text value displayed.

MenuBar sets focusTraversable to false.

To create and populate a MenuBar, you may do what is shown below. Please refer to the Menu API page for more information on how to configure it.
 Menu menu1 = new Menu("File");
 Menu menu2 = new Menu("Options");
 Menu menu3 = new Menu("Help");

 MenuBar menuBar = new MenuBar(menu1, menu2, menu3);
Image of the MenuBar control
Since:
JavaFX 2.0
See Also: