Basic HTML version of Foils prepared Sept 21 1998

Foil 25 Double Buffering to Reduce Flicker - II

From Java Tutorial 98- 3: Graphics and the Abstract Windowing Toolkit NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken


1 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.drawRect(x, y, w, h);
2 Finally at end of paint(), one could transfer the off-screen image to g by
  • g.drawImage(offscreenImage,0,0,this);
3 One would also need to override the update() method by
  • public void update(Graphics g)
  • { paint(g);
  • }

in Table To:


© 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 Sat Nov 28 1998