Java Reference
In-Depth Information
TABLE 12-7 Some Constructors and Methods of the class Graphics (continued)
public abstract void drawRoundRect( int x, int y, int w, int h,
int arcw, int arch)
//Draws a round-cornered rectangle at the position (x, y) having a
//width w and height h. The shape of the rounded corners is
//determined by the arc with the width arcw and the height arch.
public abstract void drawString(String s, int x, int y)
//Draws the string s at (x, y).
public void fill3DRect( int x, int y, int w, int h, boolean t)
//Draws a 3D filled rectangle at (x, y) of width w height h.
//If t is true, the rectangle will appear raised. The rectangle is
//filled with the current color.
public abstract void fillArc( int x, int y, int w, int h,
int sangle, int aangle)
//Draws a filled arc in the rectangle at the position (x, y) of
//width w and height h starting at angle sangle with the arc
//angle aangle. Both angles are measured in degrees. The arc is
//filled with the current color.
public abstract void fillOval( int x, int y, int w, int h)
//Draws a filled oval at the position (x, y) having a width w and
//height h. The oval is filled with the current color.
public abstract void fillPolygon( int [] x, int [] y, int num)
//Draws a filled polygon with the points (x[0], y[0]), ...,
//(x[num - 1], y[num - 1]). Here num is the number of points in
//the polygon. The polygon is filled with the current color.
public abstract void fillPolygon(Polygon poly)
//Draws a filled polygon as defined by the object poly. The polygon
//is filled with the current color.
public abstract void fillRect( int x, int y, int w, int h)
//Draws a filled rectangle at the position (x, y) of width w
//and height h. The rectangle is filled with the current color.
public abstract void fillRoundRect( int x, int y, int w, int h,
int arcw, int arch)
//Draws a filled, round-cornered rectangle at the position (x, y)
//of width w and height h. The shape of the rounded corners
//is determined by the arc with the width arcw and the height arch.
//The rectangle is filled with the current color.
1
2
public abstract Color getColor()
//Returns the current color for this graphics context.
public abstract void setColor(Color c)
//Sets the current color for this graphics context to c.
Search WWH ::




Custom Search