Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093233

[ProgressBar] changes its position during reallocation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u20
    • 7u6
    • javafx
    • 2.2.0b18

      Run code:

      import javafx.application.Application;
      import javafx.geometry.Pos;
      import javafx.scene.Scene;
      import javafx.scene.control.ProgressBar;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      public class TreeViewSample extends Application {

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

          @Override
          public void start(Stage primaryStage) {
              HBox hbox = baseFill(new HBox());
              hbox.setAlignment(Pos.BASELINE_CENTER);

              hbox.setTranslateX(10);
              hbox.setTranslateY(10);

              StackPane root = new StackPane();
              root.getChildren().add(hbox);
              primaryStage.setScene(new Scene(root, 400, 400));
              primaryStage.show();
          }

          protected HBox baseFill(HBox hbox) {
              hbox.getChildren().add(new ProgressBar());
              hbox.getChildren().add(new ProgressBar());
              hbox.setPrefSize(270, 270);
              hbox.setFillHeight(false);
              return hbox;
          }
      }

      If you resize scene, two controls will jump.

            dgrieve David Grieve
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: