User`s guide

JavaFX MenuBar
The menu bar is a container for menus. It is typically seen at the top of an application. A property
of this class called "menus" will hold a list of "Menu" objects. The text label of each menu will be
shown on the MenuBar.
See also:
JavaFX Menu
Using JavaFX Controls - 09-2013
JavaFX Menu
A JavaFX menu represents a single menu.
Among its properties are:
text – The name shown to open the menu.
items – A list of MenuItems to be shown within the menu.
See also:
JavaFX MenuBar
JavaFX MenuItem
JavaFX MenuItem
A JavaFX menu item represents an item within the menu.
Among its properties are:
text – The text to show on the menu item.
onAction – An event handler to call if this menu item is selected. This can be a lambda
function of the format:
actionEvent -> {}
There is a corresponding setOnAction() method to set the event handler.
menuItem.setOnAction(event -> {/* code */});
See also:
JavaFX Menu
Page 280