Summary Steps
Image osImg; // off-screen image
Graphics osG; // off-screen graphics
boolean startOut = true; // first time painting or not?
Dimension curD; // current size of off-screen stuff
public void update (Graphics g) {
public void paint (Graphics g) {
// is this the first time we are painting?
osImg = createImage (curD.width, curD.height);
osG = osImg.getGraphics();