February 2014
Beginner
1248 pages
62h 25m
English
Lines 36–45 declare the @FXML instance variables that the controller uses to programmatically interact with the app’s GUI. Recall from Chapter 25 that the names of these variables must match the corresponding fx:id values that you specified in Painter.fxml; otherwise, the FXMLLoader will not be able to connect the GUI components to the instance variables. Notice that two of the @FXML instance variables are ToggleGroups—in the RadioButton event handlers, we’ll use these to determine which RadioButton was selected. Lines 48–49 define two additional instance variables that store the current drawing Color and the current PenSize, respectively.
Lines 52–62 define method initialize, which is called to initialize ...
Read now
Unlock full access