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

TilePane does not work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P3
    • None
    • fx2.0
    • javafx
    • None
    • Win 7 64-bit, 32-bit JRE, JavaFX 2.0 b45

    Description

      TilePane claims that it will make all the children the same size (if they are resizeable). It does not.

      Try:
      package tiletest;
       
      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.Button;
      import javafx.scene.layout.TilePane;
      import javafx.stage.Stage;
       
      public class TileTest extends Application {
       
      public static void main(String[] args) {
      Application.launch(args);
      }

      @Override
      public void start(Stage primaryStage) {
      primaryStage.setTitle("Hello World");
      Group root = new Group();
      Scene scene = new Scene(root, 300, 250);
      String style = "-fx-padding: -1 0.5 0 0;"
      + "-fx-margin: 0;"
      + "-fx-text-fill: white;"
      + "-fx-alignment: center;"
      + "-fx-content-display:center;"
      + "-fx-font-size: 8px;"
      + "-fx-border-radius: 2;"
      + "-fx-border-width: 1;"
      + "-fx-border-insets: 0;"
      + "-fx-background-radius: 1;"
      + "-fx-background-insets: 0.9;"
      + "-fx-border-color: black;"
      + "-fx-background-color: grey;";
      TilePane tiles = new TilePane();
      Button btnE = new Button("E");
      Button btnI = new Button("i");
      Button btnO = new Button("O");
        System.out.println("Button resizeable: "+btnI.isResizable());
        btnE.setStyle(style);
      btnI.setStyle(style);
      btnO.setStyle(style);

      tiles.getChildren().add(btnE);
      tiles.getChildren().add(btnI);
      tiles.getChildren().add(btnO);
       
      root.getChildren().add(tiles);
      primaryStage.setScene(scene);
      primaryStage.show();
      }
      }

      Attachments

        Activity

          People

            amfowler Anne Fowler (Inactive)
            swpalmer Scott Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported: