JavaFX Tutorial - Toggle Button and Checkbox Click Event Selection

Опубликовано: 31 Декабрь 2018
на канале: Noble Code Monkeys
3,860
12

This JavaFX tutorial covers the JavaFX Toggle Button and how it differs from the normal single action Button.
What is a Toggle Button?
A Toggle Button in JavaFX is similar to a regular button, but it maintains a “selected” stated.
Toggle Buttons are typically used where there are two options for an action, such as “ON” or “OFF”, and you want to maintain that state until the user changes it.

These buttons are useful to minimize real estate usage on the display as well as to guide the user into the desired workflow. It should be noted that in JavaFX, CheckBoxes and ToggleButtons work the same way.

This GUI tutorial will go demonstrate the following through the use of FXML examples and controller code.
1) use the OnAction event and monitor the selection state
2) register a listener to the buttons isSelected property

The full blog version of this tutorial can be found here:

https://noblecodemonkeys.com/?p=5679

The sample code for this JavaFX example application can be found on our github: https://github.com/noblecodemonkeys/J...


На этой странице сайта вы можете посмотреть видео онлайн JavaFX Tutorial - Toggle Button and Checkbox Click Event Selection длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Noble Code Monkeys 31 Декабрь 2018, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 3,860 раз и оно понравилось 12 зрителям. Приятного просмотра!