Basics
Guides
API Reference
Basics
Guides
API Reference
[22:7] extends: MenuItem
The Menu class wraps the JavaFX Menu control, a popup list of selectable items
that is added to a MenuBar or nested inside another Menu as a submenu. Menu
extends MenuItem, which means it inherits click-event support and optional
graphic icons alongside its text label. When a user clicks a Menu entry in the
bar it opens and displays its child MenuItems or nested Menus. The showing
pseudo-class is applied automatically by JavaFX while the menu popup is open,
allowing stylesheet rules to change appearance during that state.
| Pseudo-class | Description |
|---|---|
showing |
Applies while the Menu popup is open and its items are visible. |
Menu (string Name)
Initializes a new Menu instance with the specified name.
Name The name displayed on the menu.this objectadd (Items)
Adds one or more Menu or MenuItem objects to this Menu.
Items Either a single Menu/MenuItem or a list of them to add.this object
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.