Basic HTML version of Foils prepared March 26 1999

Foil 17 Animation

From Java Academy:Graphical User Interface NPAC Java Academy February--April 99 -- March 1999. by Nancy McCracken

Examples of animations for Foil 17
In a Java applet, to get the appearance of motion, you continually draw on the canvas with a new picture.
Some animations consist of a sequence of images, where each one differs a little from the previous one. Here you just keep calling drawImage, and the new Image covers up the old one.
A graphics animation repaints with a new set of graphics shapes or objects. This leads to a loop that keeps calling repaint, which will call paint. Each time paint is called, it should draw a picture with the objects in new locations.



© 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 Fri Mar 26 1999