1

I'm using a gridpane and the second row has 4 columns. Is it possible to align them with the rows that has 3 columns? I've looked around a lot and haven't found a solution for this yet.

Here is an image of the visual

enter image description here

Navneet Krishna
  • 5,009
  • 5
  • 25
  • 44
Kev5
  • 21
  • 1
  • 9
  • You mean, the second row to have the same "width" as the first? To shrink the second row? – Sunflame Feb 21 '18 at 09:18
  • Exactly, I want Overwrite to be right after the checkbox and so on. – Kev5 Feb 21 '18 at 09:22
  • This can be solved by using a `HBox` as second element containing the checkbox and the Overwrite(label?) in the second row, then you get a 3 element row, and it is getting aligned to the first row as you want. Could this be a solution? – Sunflame Feb 21 '18 at 09:24
  • I can't believe I missed that! Thank you, you saved me a lot of time! – Kev5 Feb 21 '18 at 09:49
  • 1
    It looks like your second row has five, not four, columns. Another solution is to set the column span for the text fields to 3, and make all the buttons have the same column index. That avoids the need of an extra `HBox`. – James_D Feb 21 '18 at 10:27
  • Post your layout code or `FXML`. – SedJ601 Feb 21 '18 at 14:38

0 Answers0