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

TilePane creates extra space

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 7u6
    • fx2.1
    • javafx
    • b13

      If I use a TilePane, I recognized a extra space added to its container.

      Run this code: (and replace the tilePane by the hBox in the root.getChildren collection, to see the difference).

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.TilePane;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class TestApp3 extends Application {

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

          public void start(final Stage stage) throws Exception {

              VBox root = new VBox();

              TilePane tilePane = new TilePane();
              tilePane.getChildren().addAll(new Button(), new Button());

              HBox hBox = new HBox();
              hBox.getChildren().addAll(new Button(), new Button());

              root.getChildren().addAll(tilePane, new Button("Below this Button is a free space"));
              Scene scene = new Scene(root);
              stage.setScene(scene);
              stage.show();
          }
      }

            kwwong Kinsley Wong (Inactive)
            cschudtjfx Christian Schudt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: