26.6.6 CoverViewerController Class
Figure 26.10 shows the final version of class CoverViewerController with the app’s new JavaFX features highlighted.
Click here to view code image
1 // Fig. 26. 14: CoverViewerController.java
2 // Controller for Cover Viewer application
3 import javafx.collections.FXCollections;
4 import javafx.collections.ObservableList;
5 import javafx.fxml.FXML;
6 import javafx.scene.control.ListView;
7 import javafx.scene.image.Image;
8 import javafx.scene.image.ImageView;
9
10 public class CoverViewerController
11 {
12 // instance variables for interacting with GUI
13 @FXML private ListView<Book> booksListView;
14 @FXML private ImageView coverImageView;
15
16 ...