Chapter 11 Graphics and Java2D 619 Method Description (Web design rates)

Chapter 11 Graphics and Java2D 619 Method Description public void fillRect( int x, int y, int width, int height ) Draws a solid rectangle with the specified widthand height. The top-left corner of the rectangle has the coordinate (x, y). public void clearRect( int x, int y, int width, int height ) Draws a solid rectangle with the specified widthand height in the current background color. The top-left corner of the rectangle has the coordinate (x, y). public void drawRoundRect( int x, int y, int width, int height, int arcWidth, int arcHeight ) Draws a rectangle with rounded corners in the current color with the specified widthand height. The arcWidthand arcHeightdetermine the rounding of the corners (see Fig. 11.15). public void fillRoundRect( int x, int y, int width, int height, int arcWidth, int arcHeight ) Draws a solid rectangle with rounded corners in the current color with the specified widthand height. The arcWidthand arcHeightdetermine the rounding of the corners (see Fig. 11.15). public void draw3DRect( int x, int y, int width, int height, boolean b ) Draws a three-dimensional rectangle in the current color with the specified widthand height. The top-left corner of the rectangle has the coordinates (x, y). The rectangle appears raised when b is true and is lowered when b is false. public void fill3DRect( int x, int y, int width, int height, boolean b ) Draws a filled three-dimensional rectangle in the current color with the specified widthand height. The top-left corner of the rectangle has the coordinates (x, y). The rectangle appears raised when b is true and is lowered when b is false. public void drawOval( int x, int y, int width, int height ) Draws an oval in the current color with the specified widthand height. The bounding rectangle s top-left corner is at the coordinates (x, y). The oval touches all four sides of the bounding rectangle at the center of each side (see Fig. 11.16). public void fillOval( int x, int y, int width, int height ) Draws a filled oval in the current color with the specified width and height. The bounding rectangle s top-left corner is at the coordinates (x, y). The oval touches all four sides of the bounding rectangle at the center of each side (see Fig. 11.16). Fig. 11.13 Graphicsmethods that draw lines, rectangles and ovals (part 2 of 2). Copyright 1992 2002 by Deitel & Associates, Inc. All Rights Reserved. 7/7/01

Leave a Reply