Try to initialize a button first before setting some properties
// 8x8 shiny button layout
JButton[][] buttons = new JButton[8][8];
for (int i=0; i<8; i++) {
for (int j=0; j<8; j++) {
/*Initialize a button*/
int r = 1 + (int)(Math.random()*((7-1)+1));
buttons[i][j] = new JButton(icons[r]);
buttons[i][j].setLocation(10+j*55, 10+i*55);
buttons[i][j].setSize(69,69);
add(buttons[i][j]);
}
}