Move the arraylist to where it is defined one time and filled as needed. Don't do it every time paint() is called.
Type: Posts; User: Norm
Move the arraylist to where it is defined one time and filled as needed. Don't do it every time paint() is called.
A comment: The arraylist should NOT be defined and filled in code running inside the call to paint() method.
Take a look at this thread and see how that OP did it:
http://www.javaprogrammingforums.com/whats-wrong-my-code/33250-animation-double-buffering.html#post127731