There isn't any code to make the JFrame disappear. Look at the JFrame class (and the classes it extends) to see if there are any methods that will do what you want.
Type: Posts; User: Norm
There isn't any code to make the JFrame disappear. Look at the JFrame class (and the classes it extends) to see if there are any methods that will do what you want.
Yes that is one of the problems.
What should it do?
Did you look at the times for the first slower run and for later faster runs.
Were the the print outs made more frequently later?
How many timers are running on the second run and on later runs?...
Does it ever stop?
After a replay, how many timers are running?
Add a call to System.currentTimeMillis() to the println so you can see how often the method is called:
System.out.println("aP...
Put a println() in the actionPerformed() method that is called by the time to see when it is called.
What is printed out by the println()s I suggested you add? Do they print more often as the snake speeds up?
Can you post a complete program that compiles, executes and shows the problem?
Is there more than one method being executed that move the snake? Add println() statements next to the code that...