... class that loads and displays the Cover Viewer's GUI.
13.5.5 CoverViewerController
Class
Figure 13.15 shows the final version of class CoverViewerController
with the app’s new features highlighted.
Fig. 13.15
1 // Fig. 13.14 : CoverViewerController.java 2 // Controller for Cover Viewer application 3 import javafx.beans.value.ChangeListener;
4 import javafx.beans.value.ObservableValue; 5 import javafx.collections.FXCollections; 6 import javafx.collections.ObservableList; 7 import javafx.fxml.FXML; 8 import javafx.scene.control.ListView; 9 import javafx.scene.image.Image; 10 import javafx.scene.image.ImageView; 11 12 public class CoverViewerController { 13 // instance variables for interacting with GUI 14 @FXML private ListView<Book> booksListView; ...
Get Java How to Program, Early Objects, 11th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.