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.…
Author
Released
5/26/2016- 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
Duration
Views
Related Courses
-
Java Essential Training for Students
with Peggy Fisher3h 6m Intermediate -
Code Clinic: Java
with Patrick Royal1h 33m Intermediate -
Java 7 Essential Training
with David Gassner6h 4m Beginner
-
Introduction
-
Welcome58s
-
-
1. Get Started with JavaFX
-
What is JavaFX?2m 30s
-
The JavaFX scene graph6m 35s
-
-
2. Sample Applications
-
Add form controls4m 50s
-
Add CSS to style a form4m 6s
-
Set up an interface design5m 38s
-
3. Drawing
-
Draw lines and shapes6m 11s
-
Blend shapes5m 1s
-
Draw text6m 9s
-
Apply text effects6m 38s
-
-
4. User Interface Components
-
Lay out a user interface5m 47s
-
Include a menu3m 48s
-
-
5. Graphics
-
Add an image4m 5s
-
Solution Create a bar chart2m 15s
-
-
6. Custom UIs
-
Apply CSS themes3m 22s
-
Use selectors4m 5s
-
Create style rules3m 11s
-
-
Conclusion
-
Next steps30s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Include a menu