Implement a two-player tic-tac-toe game. Use nine buttons arranged in a three-by-three grid to form the game board. Initially, all button text should be blank, as shown here:
When a player clicks on an empty button, an appropriate “X” or “O” should appear on the button. Use JOptionPane to display the outcome of each game. Notes: The dimensions of the panel will affect the buttons’ arrangement. (Try a width of 125 and a height of 165.) For an extra challenge, use the class java.awt.GridLayout to arrange the buttons.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here