JavaFx: make progressbar undefined

I have a ProgressBar file in a javafx fxml file. How can I make this undefined in the controller?

EDIT 1 In javafx scenebuilder, you can make the progress indicator undefined with a checkbox. So, I want to do this in the controller. In other words, how can I do this with code?

+4
source share
1 answer

Assumption / Decision

Since you do not provide enough code, as usual, with MCVE , I assume that you need the following controller code:

public class FXMLDocumentController {

  @FXML
  private ProgressBar bar;

  @FXML
  private void initialize() {
    bar.setProgress(ProgressBar.INDETERMINATE_PROGRESS);
  }

}

It just sets the progress to -1.

+13
source

Source: https://habr.com/ru/post/1599533/


All Articles