go to previous page   go to home page   go to next page

Answer:

It draws the circle. It could draw an oval if the parameters were different.


Graphics Objects and Pixels

grid

The background color of the applet is the color of the drawing area. It can be set to a pre-defined color or to a custom color. This will be discussed further in a few pages.

The drawing area is represented by a Graphics object. A Graphics object has methods for doing graphical things. It is somewhat like the "paint" application of Windows operating systems. It has methods to draw lines, draw circles, write text, and so on.

The x and y dimensions tell where to place objects within the applet's area. This is like graph paper, except the (0,0) location is the upper left corner (of the applet's drawing area, not of the full screen). Increasing y values move down the area.

Distance is measured in pixels. A pixel is one of the graph paper squares that the video screen has been (conceptually) divided into. If your monitor is set to a resolution of 800 by 600, then the whole screen is divided into 800 horizontal squares and 600 vertical squares. An applet will usually cover only part of that area, perhaps an area 300 horizontal by 150 vertical. It is the responsibility of the graphics card and its driver to implement this idea of graph paper on the actual electronics of you computer system.

A pixel is not one of the little, glowing dots of phosphor on the monitor screen. Depending on the resolution you are using, an image pixel may correspond to several of these dots or a fraction of one dot.


QUESTION 4:

Say that an applet is displayed in a rectangle of 300 by 300 pixels. Does the actual size (as measured in inches) of this area depend on the resolution of the monitor?