

Properties inherited from class javafx.scene.Region background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width Labeled alignment, contentDisplay, ellipsisString, font, graphic, graphicTextGap, labelPadding, lineSpacing, mnemonicParsing, textAlignment, textFill, textOverrun, text, underline, wrapText Indicates whether the ContextMenu is currently visible.

MnemonicParsing is enabled by default for MenuButton. M.getItems().addAll(new MenuItem("Burger"), new MenuItem("Hot Dog")) Smartly repositioned, most probably to be on the opposite side of the If there is not enough room, the ContextMenu will be However, regardless of the popupSide specified, There are several useful subclasses of MenuItem includingĪ MenuButton can be set to show its menu on any side of the button. Within which you can provide anything that extends from MenuItem. Items ObservableList, and there is a Labeled.text property to specify theĪs mentioned, like the Menu API itself, you'll find an items ObservableList A MenuButton shares a very similar API to the MenuĬontrol, insofar that you set the items that should be shown in the MenuButton is a button which, when clicked or pressed, will show aĬontextMenu.
