java.awt.Container
There is no method for cell location (row, column pair), but GridLayout fills out the columns first, rows second; basically, from left to right*, top to bottom. If you use a fixed number of columns and 0 for the rows, the GridLayout will always fill the columns, adding rows as necessary. You can then calculate the cell as follows:
int column = index % columns;
int row = index / columns;
Vice versa:
int index = row * columns + column;
* unless the container's component orientation is from right to left.