Basic HTML version of Foils prepared 6 Feb 99

Foil 31 Clearing the Applet

From Java Academy I:Elementary Java NPAC/ECS Java Academy -- February to April 1998 and 1999. by Nancy McCracken (foils by Tom Scavo)


1 Let's examine update(...) more closely...
2 Given a Graphics object g, the following code fragment clears the applet window: int w = getSize().width; int h = getSize().height; g.setColor( getBackground() ); g.fillRect( 0, 0, w, h ); g.setColor( getForeground() );

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 Feb 6 1999