Code example for EventBus

Methods: register

0
        Platform.runLater(() -> itemMap.get(event.getKey()).setTab(event.getTab())); 
    } 
 
    @Override 
    public void initialize(URL url, ResourceBundle resourceBundle) {
        eventBus.register(this);
    } 
 
    public AnchorPane getRoot() { 
        return root;
    } 
 
}