How to style GridPane each grid's border
934225May 5 2012 — edited May 7 2012I wants to style gridPane like a table that each cell have border. But when I add below code, it just outer most rectangle have border, but inner cell didn't have border.
GridPane grid = new GridPane();
grid.add(new Button(), 0, 0);
grid.add(new Button(), 1, 0);
grid.add(new Button(), 0, 1, 2, 1);
grid.setStyle("-fx-border: 2px solid; -fx-border-color: red;");
How can I set the cell border of the GridPane?
Edited by: Owen on May 5, 2012 7:32 AM