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


Yes. For example, if you double the resolution of the monitor in terms of the number of pixels it displays horizontally and vertically, the applet's rectangle will be half the previous size.


Picture of an Oval

The method drawOval() is one of the methods of a Graphics object.

drawOval( int X, int Y, int width, int height )

This draws a circle or an oval that fits within the rectangle specified by the X, Y, width and height arguments. The oval is drawn inside a rectangle whose upper left hand corner is at (X, Y), and whose width and height are as specified.

The measurements are in terms of pixels. The (X, Y) position is relative to the upper left hand corner of the applet's drawing area. It gives the location of the upper left corner of a rectangle. The width and height arguments give the horizontal and vertical size of the rectangle. The drawOval() method draws the oval that fits inside the rectangle. (It does not actually draw the rectangle.)


If the height and width of the rectangle are both the same, what type of figure does drawOval() draw?