Exercises 3
e) Layout panes are container nodes that arrange their child nodes in a scene graph relative
to one another, based on their sizes and positions.
f) ToggleGroup method getToggle returns the Toggle that’s currently selected.
g) Each layout pane has a getChildren method that returns an ObservableList<Node> col-
lection containing the layout’s child nodes.
h) The only way to respond to a property change is via a property binding, which enables
a property of one object to be updated when a property of another object changes.
i) JavaFX properties are observable—when a property’s value changes, other objects can
respond accordingly.
j) Property bindings are limited to JavaFX controls.
k) In the RGBA color system, every color is represented by its red, green and blue color
values, each ranging from 0 to 255, where 0 denotes no color and 255 full color. The
alpha value (A)—which ranges from 0.0 to 1.0—represents a color’s opacity, with 0.0
being completely transparent and 1.0 completely opaque.
l) To respond to ListView selection changes, you register a listener for the SingleSelec-
tionModel’s selectedItem property.
m) To create a custom ListView cell format, you must first define a subclass of the Cell-
Format generic class (package javafx.scene.control) that specifies how to create a
ListView cell.
n) You can build JavaFX GUIs only by using Scene Builder.
o) JavaFX’s TableView control (package javafx.scene.control) displays tabular data in
rows and columns, and supports user interactions with that data.
p) You can add Labels to a GUI that describe other controls. In such cases, you should set
each Label’s describesControl property to the specific control the Label describes.
Exercises
NOTE: Solutions to the programming exercises are located in the ch12solutions folder.
Each exercise has its own folder named ex13_## where ## is a two-digit number representing
the exercise number. For example, Exercise 13.3’s solution is located in the folder ex13_03.
© 2018 Pearson Education, Inc., 330 Hudson Street, NY NY 10013. All rights reserved.