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

Weird behaviour with column span on a TextArea in a GridPane

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u13
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      JDK 7u13 (on both Mac OS X 10.8 and Windows 7)

      Description

      I ran into the following issue:

      I am using a three column layout in a GridPane. The first and third columns have their hgrow set to NEVER, the second column has it set to ALWAYS.
      The second column contains several nodes with a column span of 2 (spanning both the second and third column) as well as a regular button. The third colum only has a regular button in it.

      When the window initially appears, the second column is very small (the size of the button) and the third column is very large (although it only has a button in it). This is the exact opposite of what I expected. When I resize, the second column does get all the additional space, but the third column stays way too large.

      I have no idea what's going on here. If I set a prefWidth (some random value) on a particular node in the second column (a TextArea - it had to be this one, setting a prefWidth on the other nodes in the column didn't help) as well as on the column itself, everything works as you should expect it to.

      A code example that shows this bug (I'm guessing it is one) can be found here:
      https://docs.google.com/file/d/0B-q-VDW3dbtyTjdBTVVLWjVlT1E/edit?usp=sharing

      Uncomment the two lines that set a prefWidth on the TextArea and column to see the expected results.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                msladecek Martin Sládeček
                Reporter:
                simpejfx Steven Van Impe (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: