
200 CHAPTER 4 Introduction to Applets and Graphics
EXERCISES,PROBLEMS, AND PROJECTS
■
An (x,y) coordinate system is used to specify locations in the win-
dow. Each coordinate corresponds to a pixel (or picture element).
The x value specifies the horizontal position, beginning at 0 and
increasing as you move right across the window. The y value speci-
fies the vertical position, starting at 0 and increasing as you move
down the window.
■
All drawing on a graphics window is done in the current color,
which is changed using the setColor method.
■
Objects of the Color class, in the java.awt package, can be used to
set the current color. The Color class provides ...