Now that we have seen the many possible UI controls that we can include, let’s create a sample application with some of the controls and include logic to handle events generated by these UI components. One of the most commonly used control is the button. The button class is an extension of the Label class.
- [Voiceover] Now that we've seen the many possible…UI controls that we can include, let's create a sample…application with some of the controls and include logic…to handle events generated by these components.…One of the most commonly used controls is the button.…The button class is an extension of the label class.…Buttons can be displayed with text,…with text and an image, or just an image.…They can be styled with color and fonts using CSS…and buttons use three constructors.…
The same as a label.…You can create an empty button,…a button with text, and a button with text and an image.…Once a button is created, we can also use these set text…and set graphic methods to add text or an image…to our button.…Buttons have three states.…When the mouse is over the button,…when the mouse is not over the button,…and the action of clicking the button.…The set on action method is used to handle a button click.…Now it's time to switch to net themes and try it.…As you can see, I've already created a form.…
Let's see what it looks like.…
- 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.