Drawing Shapes

NOTE

Colors Colors are available via the Color class. This class defines constants, such as Color.red, Color.white, and Color.blue, which can be used to identify colors by name. Colors can also be created using their red, blue, and green color values.

Some programs, such as the Microsoft Windows Paint program, are used to construct images by painting on the screen. These paint programs create an image array of color pixels and update the array based on user paint commands. These commands might consist of pixel-level drawing operations or more general operations that draw geometrical objects such as circles, rectangles, and lines. Painting programs are characterized by the fact that the pixel array is the focus for the drawing that ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.