import java.util.*; import java.awt.*; import javax.swing.*; public class ChessBoard { // Instance variables. int size; char[][] board; // board[i][j] == 'X' if there's a queen on it. // Constructor. public ChessBoard (int size) { // Build the board. Initially empty: board[i][j] == 'O'. this.size = size; board = new char [size][size]; for (int i=0; i