Basic HTML version of Foils prepared May 12 1996

Foil 103 Double Buffering to Reduce Flicker - I

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


1 Here you have two "graphics contexts" (frame buffers of the size of the applet), and you construct the next image for an animation "off-line" in the second frame buffer.
2 This frame buffer is then directly copied to the main applet Graphics object without clearing image as in default update()
3 Image OffscreenImage; // Place to hold Image
4 Graphics offscreenGraphics; // The second graphics context which contains offscreenImage
5 offscreenImage = createImage(width,height);
6 offscreenGraphics = offscreenImage.getGraphics();

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 Sun Dec 14 1997