You should combine your for loops, no need to go through the same procedure 3 times. Are you just adding buttons for the click listener? You should be getting compile time errors for trying to call...
Type: Posts; User: theoriginalanomaly
You should combine your for loops, no need to go through the same procedure 3 times. Are you just adding buttons for the click listener? You should be getting compile time errors for trying to call...
Firstly you need to initialize the individual JPanels. Secondly, you need to add them to something.
board[i][j] = new JPanel();
add(board[i][j];