Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+5 votes

When adding a button to a gridpane we use gridPane.add(btn1, 0,0,1,1);. What do the last two integer arguments do?

asked in CSC305 Fall 2019 by (1 point)

1 Answer

0 votes
  • I am not sure if this answers your question but the first two integer represents the column and row index. The last two represents the columnSpan and rowSpan (the number of rows the child's layout area spans horizontally). You can read more about it here:

https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/GridPane.html
*

answered by (1 point)
...