Some Graphics class methods we may like to use | |
---|---|
void |
draw3DRect(int x,
int y, int width, int height, boolean raised)
Draws a 3-D highlighted outline of the specified rectangle. |
abstract
void |
drawArc(int x,
int y, int width, int height, int startAngle, int arcAngle)
Draws the outline of a circular or elliptical arc covering the specified rectangle. |
abstract
void |
drawLine(int x1,
int y1, int x2, int y2) Draws a line, using the current color, between the points (x1, y1)
and (x2, y2) in this graphics context's coordinate system. |
abstract
void |
drawOval(int x,
int y, int width, int height) Draws the outline of an oval. |
abstract
void |
drawPolygon(int[] xPoints,
int[] yPoints, int nPoints) Draws a closed polygon defined by arrays of x and y coordinates. |
abstract
void |
drawPolyline(int[] xPoints,
int[] yPoints, int nPoints) Draws a sequence of connected lines defined by arrays of x and y coordinates. |
void |
drawRect(int x,
int y, int width, int height) Draws the outline of the specified rectangle. |
abstract
void |
drawString(String str,
int x, int y) Draws the text given by the specified string, using this graphics context's current font and color. |
void |
fill3DRect(int x,
int y, int width, int height, boolean raised)
Paints a 3-D highlighted rectangle filled with the current color. |
abstract
void |
fillArc(int x,
int y, int width, int height, int startAngle, int arcAngle)
Fills a circular or elliptical arc covering the specified rectangle. |
abstract
void |
fillOval(int x,
int y, int width, int height) Fills an oval bounded by the specified rectangle with the current color. |
abstract
void |
fillPolygon(int[] xPoints,
int[] yPoints, int nPoints) Fills a closed polygon defined by arrays of x and y coordinates. |
abstract
void |
fillRect(int x,
int y, int width, int height) Fills the specified rectangle. |
abstract
void |
fillRoundRect(int x,
int y, int width, int height, int arcWidth, int arcHeight)
Fills the specified rounded corner rectangle with the current color. |
abstract
void |
setColor(Color c)
Sets this graphics context's current color to the specified color. |
abstract
void |
setFont(Font font)
Sets this graphics context's font to the specified font. |
This listing has been selected by Mr. Merlis from the Graphics Java 1.5 API.