Here is an example of setting a graphic icon for a JavaFX Menu instance: Menu menu = new Menu("Menu 1"); menu.setGraphic(new ImageView("file:volleyball.png")); Here is how the resulting menu could look in a JavaFX application: Menu Eve
Using JavaFX UI Controls. This tutorial covers built-in JavaFX UI controls available in the JavaFX API. The document contains the following chapters: Label. Button. Radio Button. Toggle Button. Checkbox. Choice Box. Text Field. Password Field. Scroll Bar.
Explanation: As you can see in the above output, we have added the first menu items to the menu, sub menu items to the submenu, sub menu items to the menu and menu to the menu bar respectively.
Post a Comment:
Showing 0 Comments: