HELP! * GREY=local LOCAL HTML version of Foils prepared July 10 1996

Foil 153 Double Buffering to Reduce Flicker - II

From Basic Lectures on Java Language Applets Graphics Networking Trip to China and Icase Tutorial -- July 12-28 and June 10-13 96. by Geoffrey C. Fox * See also color IMAGE

In paint(), one will construct applet image in offscreenGraphics as opposed to the argument g of paint(). So one would see statements such as:
  • offscreenGraphics.drawImage(img,10,10,this);
Finally at end of paint(), one could transfer the double buffered image to g by
  • g.drawImage(offscreenImage,0,0,this);
One would also need to override the update() method by
public void update(Graphics g) {
paint(g);
}



Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Feb 18 1997