@@ -0,0 +1,1369 @@
+//%0Aimport javax.swing.*;%0Aimport java.awt.GridLayout;%0Aimport java.awt.event.MouseListener;%0Aimport java.awt.event.MouseEvent;%0A%0A%0Aclass CheckerBoardCell extends JButton implements MouseListener %7B%0A%09public CheckerBoardCell(String label) %7B%0A%09%09super.setText(label);%0A%09%7D%0A%09%0A%09public void mousePressed(MouseEvent me)%7B%7D%0A%09public void mouseReleased(MouseEvent me)%7B%7D%0A%09%0A%09public void mouseClicked(MouseEvent me)%7B%0A%09%09if (me.getButton() == MouseEvent.BUTTON1) %7B%0A%09%09%09super.setText(%22O%22);%0A%09%09%09super.setEnabled(false);%0A%09%09%7D else if (me.getButton() == MouseEvent.BUTTON3) %7B%0A%09%09%09super.setText(%22X%22);%0A%09%09%09super.setEnabled(false);%0A%09%09%7D%0A%09%7D%0A%09public void mouseEntered(MouseEvent me)%7B%7D%0A%09public void mouseExited(MouseEvent me)%7B%7D%0A%09%0A%7D%0A%0Apublic class CheckerBoard %7B%0A%09public static void main(String s%5B%5D) %7B%0A%09%09// Create object of class JFrame with label/title Hello Ween%0A%09%09JFrame window = new JFrame(%22Tic Tac Toe !%22);%0A%09%09%0A%09%09// Default layout for the JFrame is BorderLayout with default position CENTER%0A%09%09window.setLayout(new GridLayout(0,3));%0A%09%09window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);%0A%09%09%0A%09%09/**%0A%09%09* 0 1 2%0A%09%09* 3 4 5%0A%09%09* 6 7 8%0A%09%09*/%0A%09%09CheckerBoardCell buttons%5B%5D = new CheckerBoardCell%5B9%5D;%0A%09%09for (int i = 0; i %3C 9; ++i) %7B%0A%09%09%09buttons%5Bi%5D = new CheckerBoardCell(%22CHECK%22);%0A%09%09%09buttons%5Bi%5D.addMouseListener(buttons%5Bi%5D);%0A%09%09%09window.getContentPane().add(buttons%5Bi%5D);%0A%09%09%7D%0A%09%09window.pack();%0A%09%09window.setVisible(true);%0A%09%7D%0A%7D%0A

Create CheckerBoard.java