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.

No overload for method ” takes 1 argument

Here, you are passing an extra argument (true) to the method GetActive. As we can see from the method declaration of GetActive, it takes no parameters: I think what you mean here is “if Player2.GetActive() is true…” right? You don’t need to specify the value you want if it is true, just doing this is … Read more

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 forumuedusedusedusedusedueduseduseduseduedu