JDK-8124037 : TextArea in GridPane will not stretch vertically
  • Type: Bug
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 7u15,8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-03-12
  • Updated: 2015-06-17
  • Resolved: 2013-09-12
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
Description
Using a GridPane to implement a simple form, I have a column of labels and a column of controls.  The bottom right control is a text area.  The bottom row and right column are set to grow always. The TextArea max width and height are set to MAX_VALUE.  But the TextArea will only grow horizontally, and adjust a little bit vertically - but it will stop crowing vertically such that it does not fill the "cell" in the GridPane.
(Sample code on the way.)

Same issue also appears in HBox.
Comments
Fixed by RT-31006
12-09-2013

Lowering the priority as there's an existing workaround.
02-05-2013

The problem is that vgrow doesn't work when valignment is BASELINE. This is correct for other Nodes (which have baseline equal to their height), but fails for Nodes that have some text. I don't think it's possible to fix this without some API changes that would allow us to query whether the Node should be grown even through it has a baseline alignment. Until then, you can workaround it by either not using BASELINE alignment or explicitly set the height of the TextArea using setPrefHeight() or setMinHeight().
25-04-2013

The key is that the GridPane is in the CENTER of a BorderPane. When the GridPane is in an AnchorPane instead, it grows as expected.
12-03-2013