This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JavaFX and the fly likes fixed and percentage columns in gridpane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "fixed and percentage columns in gridpane" Watch "fixed and percentage columns in gridpane" New topic
Author

fixed and percentage columns in gridpane

Carl Bernardi
Greenhorn

Joined: Jan 15, 2013
Posts: 23
Hi,

I want a gridpane layout as in the attached image. Anyone know how to this or am I using the wrong layout?





[Thumbnail for layout.jpg]

Carl Bernardi
Greenhorn

Joined: Jan 15, 2013
Posts: 23
I figured out the solution to my problem. Use setHgrow(Priority.ALWAYS) on the first column and setVgrow(Priority.ALWAYS) on the first row.
Carl Bernardi
Greenhorn

Joined: Jan 15, 2013
Posts: 23
Carl Bernardi wrote:I figured out the solution to my problem. Use setHgrow(Priority.ALWAYS) on the first column and setVgrow(Priority.ALWAYS) on the first row.


Turns out that GridPane sort of solves the problem. It does handle resizing very well. The perfect way to do this is use anchor pane.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: fixed and percentage columns in gridpane