Javafx Task - update progress from a method
问题 In a JavaFX application I wish to update a status bar according to some work logic which I've implemented in an other class. I can't figure out how to combine my desire to pass to work logic to the method (and not to write it inside the task) and to know about the work progress percentage. This is an example of the controller with the Task: public class FXMLDocumentController implements Initializable { @FXML private Label label; @FXML ProgressBar progressBar; @FXML private void