So I think you will understand my problem by this piece of code:
int s = 4;
int v = 4;
world.setLayout(new GridLayout(s, v));
grid = new JLabel[s][v];
for (int x = s-1; x >= 0; x--) {
for (int y = 0; y < v; y++) {
grid[x][y] = new JLabel((x)+","+(y));
world.add(grid[x][y]);
Now I get a grid with coordinates:
3,0 3,1 3,2 3,3
2,0 2,1 2,2 2,3
1,0 1,1 1,2 1,3
0,0 0,1 0,2 0,3
But I would like to get:
0,3 1,3 2,3 3,3
0,2 1,2 2,2 3,2
0,1 1,1 2,1 3,1
0,0 1,0 2,0 3,0
Any help appreciated..
I didn't test it but try this out:
I did not test it, but try change your code:
to: