# Uses of Class
javafx.scene.control.MenuItem

Packages that use MenuItem
Package
Description
javafx.scene.control
The JavaFX User Interface Controls (UI Controls or just Controls) are specialized Nodes in the JavaFX Scenegraph especially suited for reuse in many different application contexts.

- ## Uses of MenuItem in javafx.scene.control

  Subclasses of MenuItem in javafx.scene.control
  Modifier and Type
  Class
  Description
  `class`
  `CheckMenuItem`
  A `MenuItem` that can be toggled between selected and unselected states.
  `class`
  `CustomMenuItem`
  A `MenuItem` that allows for arbitrary nodes to be embedded within it, by assigning a `Node` to the `content` property.
  `class`
  `Menu`
  A popup menu of actionable items which is displayed to the user only upon request.
  `class`
  `RadioMenuItem`
  A RadioMenuItem is a `MenuItem` that can be toggled (it uses the `Toggle` mixin).
  `class`
  `SeparatorMenuItem`
  A `MenuItem` that as the name suggests allows for a horizontal Separator to be embedded within it, by assigning a `Separator` to the `content` property of the `CustomMenuItem` This is provided for convenience as groups of `menuitems` can be separated by a separator.
  Methods in javafx.scene.control that return types with arguments of type MenuItem
  Modifier and Type
  Method
  Description
  `final ObservableList<MenuItem>`
  ContextMenu.`getItems()`
  The menu items on the context menu.
  `final ObservableList<MenuItem>`
  Menu.`getItems()`
  The items to show within this menu.
  `final ObservableList<MenuItem>`
  MenuButton.`getItems()`
  The items to show within this buttons menu.
  Constructors in javafx.scene.control with parameters of type MenuItem
  Modifier
  Constructor
  Description
  ``
  `ContextMenu(MenuItem... items)`
  Create a new ContextMenu initialized with the given items
  ``
  `Menu(String text, Node graphic, MenuItem... items)`
  Constructs a Menu and sets the display text with the specified text, the graphic `Node` to the given node, and inserts the given items into the `items` list.
  ``
  `MenuButton(String text, Node graphic, MenuItem... items)`
  Creates a new menu button with the given text and graphic to display on the button, and inserts the given items into the `items` list.
  ``
  `SplitMenuButton(MenuItem... items)`
  Creates a new split menu button with the given list of menu items.