|
The proper way to "call" painting methods is to tell the enclosing class to repaint. For this to work then you must make changes to member variable in the class to control what/how you want the painting behavior to be. You can change the images or use boolean flags to control which images are displayed. The graphics component paints itself acccording the the state which are member variables used to control what happens in the method. Swing handles everything with the graphics context, g.
|