package test; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.ProgressBar; import javafx.scene.control.ProgressBarBuilder; import javafx.scene.layout.VBox; import javafx.scene.layout.VBoxBuilder; import javafx.stage.Stage; public class FXProgressbar extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) throws Exception { ProgressBar pb = ProgressBarBuilder.create().prefWidth(600).build(); // indeterminate progressbar VBox vb = VBoxBuilder.create().visible(false).children(pb).build(); // high CPU load whether visible or not Group g = new Group(vb); Scene s = new Scene(g); primaryStage.setScene(s); primaryStage.show(); } }