@SuppressWarnings("deprecation")
	public void actionPerformed(ActionEvent e) {
		if (e.getSource() instanceof JMenuItem) {
			if (e.getActionCommand() == "New Game") {
				JOptionPane pane = new JOptionPane("Do you wish to go first?",
						JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION);
				JDialog dialog = pane.createDialog(this, "2P");
				dialog.show();

				Object selectedValue = pane.getValue();
				if (selectedValue.equals(new Integer(JOptionPane.YES_OPTION))) {
					for (int i = 0; i < 3; i++) {
						for (int j = 0; j < 3; j++) {
							c[i][j].token = ' ';
							c[i][j].repaint();
							c[i][j].removeMouseListener(c[i][j]);
							c[i][j].addMouseListener(c[i][j]);
						}
					}

					jlblStatus.setText("X's turn");
					turn = 'X';
					com = 'O';
					hum = 'X';
				} else {
					for (int i = 0; i < 3; i++) {
						for (int j = 0; j < 3; j++) {
							c[i][j].token = ' ';
							c[i][j].repaint();
							c[i][j].addMouseListener(c[i][j]);
						}
					}

					jlblStatus.setText("X's turn");
					turn = 'X';
					com = 'O';
					hum = 'X';

					int r = (int) (3 * Math.random());
					int col = (int) (3 * Math.random());
					c[r][col].token = com;
					c[r][col].repaint();
					turn = hum;
					jlblStatus.setText(turn + "'s turn");

				}
			} else if (e.getActionCommand() == "Exit") {
				System.exit(1);
			}
		}
	}