I’m working on a java game. in which after some regular millisecond i’m repainting the screen.
But if the timer duration becomes very less then in that case screen starts flickering.
Is there any way to avoid it??
Can we use Multithreading to avoid this???
You could use double buffering.
Here a “double buffering with Java” tutorial: Double Buffering and Page Flipping.
Multithreading alone does not solve this problem…