Here is my loop class:
public class Timer {
private Timer timer;
private static boolean isRunning = true;
public static void gameLoop()
{
while(isRunning) //the loop
{
try {
Main.cash--;
Thread.sleep(2000);
} catch (InterruptedException e) {
// e.printStackTrace();
}
}
}
}
When I run the applet, I get a white screen, and I cannot close the applet, I have to use the terminate button in eclipse.