I have developed a snake game in Java. The problem is that I see a flicker while the game is running. Can anyone please inform me why this is happening and direct me to a possible solution?
The code for the game can be found here.
Have you considered double buffering?
Looking at your code, what about the following being a potential cause
Thread.sleep(1000)