Welcome to the first challenge for this series on JavaFX. For this challenge, let’s work on separating the interface design from the main business logic in the program. The challenge objectives include: separate interface design, create a FXML appliction, add a label with instructions, add a button, add an event handler.
- [Voiceover] Welcome to the first challenge…for this series on JavaFX.…For this challenge, let's work on…separating the interface design…from the main business logic in the program.…Use the JavaFX FXML application template…and create a program called ask me.…Add a label that contains the instructions.…The instructions should say,…think of a question in your mind…and press the button for an answer.…Next, add a button that displays the message, 'Ask me!'…Finally, when the button is pressed,…display a random message.…
Make sure you have at least four or five messages…that can be displayed…and use a random number generator…to choose a message each time.…I estimate this challenge might take about 15 minutes.…This estimate is probably a little long,…but is the first one in the series…and it might take some time debugging.…After you're done, check out the solution movie…to see how I solved the problem.…Good luck!…
- 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.