Getting Input from the User
IN THIS CHAPTER
Working with text fields and areas
Validating numeric data and creating check boxes
Setting radio buttons
Using some of these components in a complete program
In the first four chapters of this minibook, I discuss how to create JavaFX programs using only two basic JavaFX input controls: labels and buttons. If all you ever want to write are programs that display text when the user clicks a button, you can put the book down now. But if you want to write programs that actually do something worthwhile, you need to use other JavaFX input controls.
In this chapter, you find out how to use some of the most common JavaFX controls. First, you read about the label and controls that get information from the user. You find out more details about the text field control, which gets a line of text, and the text area control, which gets multiple lines. Then I move on to two input controls that get either/or information from the user: radio buttons and check boxes.
Along the way, you discover an important aspect of any JavaFX program that collects ...