set All Column in JavaFX GridPane Horizontal Grow - Java JavaFX

Java examples for JavaFX:GridPane

Description

set All Column in JavaFX GridPane Horizontal Grow

Demo Code


//package com.java2s;

import javafx.scene.Node;

import javafx.scene.layout.GridPane;
import javafx.scene.layout.Priority;

public class Main {
    public static void setAllColumnHGrow(GridPane pane, Priority rule) {
        for (Node child : pane.getChildren()) {
            GridPane.setHgrow(child, rule);
        }//  w  w  w .  j  av a 2 s. com
    }
}

Related Tutorials