GridPane not honoring preferred width of child when other child in same column has smaller max size

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • fx2.0
    • Affects Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      Mac OS X 10.5.8, JavaFX Beta Build 21

      The following code doesn't show the contents of the HBox (note that this is true even when you remove the setMaxHeight calls),

      Button v = new Button("FOO");
      v.setMaxHeight(Double.MAX_VALUE);

      HBox infoLine = new HBox();
      Label timeDisplay = new Label("AAA");
      Label resultCount = new Label("BBB");
      Label status = new Label("CCC");
      infoLine.getChildren().addAll(timeDisplay, resultCount, status);
      infoLine.setMaxHeight(Control.USE_PREF_SIZE);

      GridPane view = new GridPane();
      GridPane.setConstraints(v, 0, 0);
      GridPane.setConstraints(infoLine, 0, 1);
      GridPane.setVgrow(v, Priority.ALWAYS);
      GridPane.setHgrow(v, Priority.ALWAYS);
      GridPane.setVgrow(infoLine, Priority.NEVER);
      GridPane.setHgrow(infoLine, Priority.NEVER);
      view.getChildren().addAll(v, infoLine);

      Scene sx = new Scene(view, 300, 500);
      stage.setScene(sx);
      stage.setVisible(true);

            Assignee:
            Anne Fowler (Inactive)
            Reporter:
            Graham Matthews (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: