I'm trying to center a button in JavaFX using Gridpane. I was told to use colspan and rowspan, but I can't figure out how those work.
pane.add(label1, 0, 1);
pane.add(text1, 1, 1);
pane.add(radioButton1, 0, 2);
pane.add(radioButton2, 1, 2);
pane.add(label2, 0, 3);
pane.add(text2, 1, 3);
pane.add(button, 0, 4); //What I'm trying to span.
This is what I have, and This is where I want the button to be.