Basic HTML version of Foils prepared 13 July 98

Foil 22 Color Constants

From Java Academy II:Intermediate Java NPAC/ECS Java Academy -- February to April 98. by Tom Scavo

Pre-defined Colors for Foil 22
1 For convenience, the Color class pre-defines thirteen static Color constants
2 Use a constant anywhere a Color is required: setBackground( Color.red ); setForeground( Color.black ); ... g.setColor( Color.white );
3 (Why did the Java designers neglect to capitalize the Color constants?)

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