Java examples for JavaFX:GridPane
Set JavaFX grow to row.
//package com.java2s; import javafx.scene.layout.GridPane; import javafx.scene.layout.Priority; import javafx.scene.layout.RowConstraints; public class Main { /**//from w w w. j a va 2 s . co m * Set grow to row. If GridPane have more than and 1 row, * <b>need use for each</b>. * @param grid */ public static void autoSizeGridPaneRows(GridPane grid) { RowConstraints rc = new RowConstraints(); rc.setVgrow(Priority.ALWAYS); grid.getRowConstraints().add(rc); } }