Incremental graphics painting in applet
I have been doing graphics drawing in Eclipse using Applet abstract class and paint() method. Everything works fine except for one situation. On a mouse click I draw a graphics object. On a different mouse click I redraw the same object at a different location via a call to repaint() in mouse click event method. So far, so good. But I can't figure out how to keep each prior painted object on the screen after each new mouse click. It seems repaint() clears the screen. In researching the repaint() method there doesn't seem to be a crisp explanation of how to do incremental painting other than manually keeping track of each drawing object in an array list and then redrawing from that on the call to repaint(). That seems awfully burdensome. I can't believe that's the only way. Any ideas?