以下代码给了我一个错误:找不到符号
public static boolean playerTurn = true;
public static boolean playerWon = false;
public static boolean player2Won = false;
public static TicTacToe board = new TicTacToe();
public static void main (String args []) {
if (board.isVisible() == false){
board.setVisible(true);
}
}
这是另一个类的代码的第一部分:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.GroupLayout;
import javax.swing.LayoutStyle;
public class TicTacToe extends JFrame {
public TicTacToe() {
initComponents();
}
为什么我会收到此错误?我该如何解决?