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
Code: Select all
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){
}
}
}