To wrap things up, Reynald makes the button display the text message when the user presses it.
- [Instructor] So we're ready to make the button…to display the text message when the user presses it,…and we do that with this code here,…starting on line 71.…Now, right below 71,…you'll see we use setOnAction,…and that method is used to register an event handler…that sets the action target object…to assign in button pressed…when the user presses the button.…The color of the action target object…is set to fire brick red.…
So now the moment of truth.…Let's go ahead…and test our application by executing it.…And here we go.…Let's do this.…So we can put in a user name…and a fake password,…or a real one, if you choose,…and let's click Sign in to evoke our event,…and it does evoke it,…and it says Sign in button was pressed,…just as we expected.…So this is nice.…
The UI looks fairly clean,…and if we decided to try to resize it,…the positions based on how we coded it…stays nice and centered.…And that's one of the benefits of JavaFX,…and that's why I prefer it for desktop applications.…
- What is NetBeans?
- Creating templates
- Importing and exporting projects
- Debugging code
- Creating a project
- Creating a GridPane layout
- Creating the UI
- Deploying and executing an app
- Organizing the environment
Skill Level Beginner
1. Intro to NetBeans
2. Templates, Projects, and Debugging
3. Managing Services
4. Desktop Development: JavaFX
5. Web Development - PrimeFaces
6. Working with Clean Code
- 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.