Hi I got an error that is about the gameThread variable in my java code is says: "Exception in thread "Thread-0" java.lang.Error: Unresolved compilation problem: gameThread cannot be resolved to a variable"
any ideas thanks for the help
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JPanel;
public class GamePanel extends JPanel implements Runnable{
public void startGameThread(){
Thread gameThread = new Thread(this);
gameThread.start();
}
@Override
public void run(){
while(gameThread != null){
}
}
}