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