ProgressIndicator with an indeterminate value : ProgressIndicator « JavaFX « Java






ProgressIndicator with an indeterminate value

 

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ProgressIndicator;
import javafx.stage.Stage;

public class Main extends Application {

  @Override
  public void start(Stage stage) {
    Group root = new Group();
    Scene scene = new Scene(root, 260, 80);
    stage.setScene(scene);

    Group g = new Group();

    ProgressIndicator p1 = new ProgressIndicator();
   
    
    g.getChildren().add(p1);
    
    scene.setRoot(g);
    stage.show();
  }

  public static void main(String[] args) {
    launch(args);
  }
}

   
  








Related examples in the same category

1.ProgressIndicator and Background Processes
2.ProgressIndicator which is 25% complete