private void createGUI() {
		if (grid == null || grid.length == 0) {
			System.out.println("You did not initialize the grid! You must "
					+ "initialize the grid to run the puzzle!");
			System.exit(0);
		}

		// Create the window.
		JFrame.setDefaultLookAndFeelDecorated(true);
		window = new JFrame("Column Puzzle");
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		window.setResizable(false);

		// Set up the content pane.
		Container cp = window.getContentPane();
		cp.setLayout(new GridLayout(grid.length, NUM_OF_COLUMNS));
		cp.addMouseListener(this);

		// Add panels.
		for (int row = 0; row < grid.length; row++) {
			for (int col = 0; col < grid[row].length; col++) {
				JPanel cell = new JPanel();
				cell.setPreferredSize(new Dimension(100, 100));
				cell.setBackground(grid[row][col]);
				cell.setBorder(BorderFactory.createLineBorder(Color.BLACK));
				cp.add(cell);
			}
		}

		paint();
	}