Im displaying a 8x8 grid of pictures for a new game and these pictures are places randomly using a two dimensional array and math.random()
There is also a "new game" button I want the user to be able to refresh the page without opening a new GUI and re displaying the grid aswell.
This is my method for displaying the grid
for (int r = 0; r < ShinyButtons.ROWS; r++){
for (int c = 0; c < ShinyButtons.ROWS; c++) {
newbuttonTable[r][c] = new JButton(icons[(int) (Math.random()*7)]);
newbuttonTable[r][c].setLocation(10+c*69, 10+r*69);
newbuttonTable[r][c].setSize(69, 69);
add(newbuttonTable[r][c]);
}