This discussion is archived
0 Replies Latest reply: Mar 17, 2013 6:40 AM by 990211 RSS

setting GridPane Column/Row amount

990211 Newbie
Currently Being Moderated
is there any way to set a GridPane amount of culumns and row?

i currently have something like this:
<fx:root type="GridPane" xmlns:fx=""
         maxHeight="Infinity" maxWidth="Infinity">
        <Pane fx:id="center"
              GridPane.columnIndex="1" GridPane.rowIndex="1"
              GridPane.columnSpan="5" GridPane.rowSpan="3"
              GridPane.hgrow="always" GridPane.vgrow="always"/>
        <Pane fx:id="options"
              GridPane.columnIndex="0" GridPane.rowIndex="5"
and i dynamicaly add elements into it
the problem comes that if a row/column do not have any element it is erased, so the appearance of the pane is weird (like adding an element to (3,0) and then having elements on (2, X), (1, X) the element on (3,0) will not be centered on the pane since no element on (4,X) and (5,X))


  • Correct Answers - 10 points
  • Helpful Answers - 5 points