July 2017
Intermediate to advanced
466 pages
11h 24m
English
While we can define the structure of the user interface in FXML in all but the most trivial applications, the user interface still requires some Java code to finish defining its behavior. We'll do that now in DeskDroidController.initialize(). We'll start with the left side of the user interface, the conversation list, as follows:
@FXML private ListView<Conversation> convList; private final ObservableList<Conversation> conversations = FXCollections.observableArrayList(); private final SimpleObjectProperty<Conversation> conversation = new SimpleObjectProperty<>(); @Override public void initialize(URL url, ResourceBundle rb) { convList.setCellFactory(list -> new ConversationCell(convList)); convList.setItems(conversations); ...Read now
Unlock full access