Help on removing graphic objects in an applet.
Posted on 2002-05-28
If I have used the paint() method to draw a number of line and rectangular objects (in the process or creating graphs), how do I go about removing those graphics, so make room for other objects?
One possible solution I found was to simply cover up the graphic with something the color of the background, but this won't work if the background changes color in certain parts of the applet, and will also obscure any other objects (buttons, labels) I don't want to remove.
Is there a method I can use to simply destroy all Graphic objects I have initialized?