TicTacToe with GUI in Java

You only need to import import javax.swing.*; for the TicTacToe.java. Edit the win if statements and delete the static definitions: Add TicTacToe ticTacToe = new TicTacToe(); to the Gui variables. Change the action listener: Delete TicTacToe ticTacToe = new TicTacToe(); from the Control. Always check your errors, you had more NullPointerException exception than you can count.

tic tac toe java user vs computer

The issue was in your computerMove logic. This should work for you, just copy paste this in place of your computerMove. Now as to why your code didn’t work:- Your code: The while loop looks at the position and sees that there is no ‘-‘, thus runs. Then inside your while loop you have a … Read more

techhipbettruvabetnorabahisbahis forumuedueduseduedueduedueduedueduedus