@Override public void changed( ObservableValue<? extends Service<?>> observableValue, Service<?> oldValue, Service<?> newValue) { try { if (oldValue != null) { taskTitleLabel.textProperty().unbind(); taskMessageLabel.textProperty().unbind(); taskProgress.progressProperty().unbind(); killTaskButton.visibleProperty().unbind(); } if (newValue != null) { taskTitleLabel.textProperty().bind(newValue.titleProperty()); taskMessageLabel.textProperty().bind(newValue.messageProperty()); taskProgress.progressProperty().bind(newValue.progressProperty()); if (newValue instanceof DataFxService<?>) { killTaskButton.visibleProperty().bind(((DataFxService<?>) newValue).cancelableProperty()); } else { killTaskButton.visibleProperty().set(true); } anchorPane.setVisible(true); } else { anchorPane.setVisible(false); } } catch (Exception e) { e.printStackTrace(); } } });