25.5.2 Q2: Which of the following statements is false?
a. Each cell in a GridPane can be empty or can hold one or more JavaFX components,
including layout containers that arrange other controls.
b. Each component in a GridPane can span multiple columns or rows.
c. A TextField (package javafx.scene.control) can accept text input or display text.
d. A Slider (package javafx.scene.control) represents a value in the range 0.0–1.0
by default and allows the user to select a number in that range by moving the Slider’s
thumb.
0.0–1.0 by default and allows the user to select a number in that range by moving
25.5.2 Q3: Which of the following statements is false?
a. When the user interacts with a GUI component, the interaction—known as an event—
drives the program to perform a task.
b. For events that occur when the value of a control’s property changes, you must create
the event handler entirely using only drag and drop in Scene Builder.
c. The code that performs a task in response to an event is called an event handler.
d. For certain events you can link a control to its event-handling method by using the
Code section of Scene Builder’s Inspector window. In this case, the class that
implements the event-listener interface will be created for you and will call the method
you specify.
25.5.2 Q4: Which of the following statements is false?
a. JavaFX applications in which the GUI is implemented as FXML adhere to the Model-
View-Controller (MVC) design pattern, which separates an app’s data (contained in the
model) from the app’s GUI (the view) and the app’s processing logic (the controller).
b. The model presents the data stored in the view.
c. When a user provides input, the controller modifies the model with the given input.
d. When the model changes, the controller updates the view to present the changed data.
25.5.2 Q5: In a JavaFX FXML app, you define the app’s event handlers in a________
class, which defines instance variables for interacting with controls programmatically, as
well as event-handling methods.
a. view
b. model
c. controller
d. data