Most applications have some type of menu, where the menu is a list of actionable items. When you select one of the menu options, it often provides the user with a submenu of items to choose from. Then an action is invoked when the user makes their selection. When creating menus, first identify the menu bar items, then define a list of category menus for each item, and finally populate the category menus with menu items.
- [Voiceover] Most applications have some type of a menu…where the menu is a list of actionable items.…When you select one of the menu options…it often provides the user with…a submenu of items to choose from.…Then an action is invoked when…the user makes their selection.…When creating menus in JavaFX,…the first thing we need to do is identify…the menu bar items.…For example, in Netbeans, the menu bar contains…things like File, Edit, View, Navigate, et cetera.…
Next, we'll define a list of menu items…for each of the menu bar items.…In Netbeans again, under File, the first…two items are new project and new file.…A menu object can also contain submenus…and to separate menu items, you can use…a separator, from the separator menu item class.…It is important to note that the menu items are…not considered nodes, and therefore cannot be…added directly to the scene.…
Instead, we add the menu bar through the…get menus method.…Let's look at an example.…Here is the start of a program that…includes a menu.…Let's run it, and see where it stands.…
- What is JavaFX?
- Creating a simple JavaFX program
- Drawing lines, shapes, and text
- Applying effects
- Adding and animating images and charts
- Customizing interfaces with CSS
Skill Level Intermediate
1. Get Started with JavaFX
2. Sample Applications
4. User Interface Components
6. Custom UIs
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.