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

FlowPane within GridPane behaves incorrectly

    Details

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

      W7 b45

      Description

      Per the GridPane documentation: "By default, rows and columns will be sized to fit their content; a column will be wide enough to accommodate the widest child, a row tall enough to fit the tallest child."

      In my attached sample app, I have a GridPane with 1 row and 1 column that contains an instance of FlowPane. The GridPane seems to think the FlowPane is taller than it is. The background colors I've set should illustrate this...the GridPane is pink and FlowPane is blue. If you add more labels to the FlowPane, the GridPane's seems to grow further away from the FlowPane's actual height. If I replace the FlowPane with an HBox, the GridPane sizes itself correctly.

      I should note that although my sample is strange in that it has only 1 row and column, I originally encountered this issue in a more normal setting where there were 2 rows and columns.

        Attachments

          Activity

            People

            • Assignee:
              kwwong Kinsley Wong
              Reporter:
              kmcintyrejfx Kyle McIntyre (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: