Java GUI 绘图

Graphics

// 设置画笔的颜色
public abstract void setColor(Color c);
// 设置画笔的字体
public abstract void setFont(Font font);

// 绘制直线
public abstract void drawLine(int x1, int y1, int x2, int y2);
// 绘制位图
public abstract boolean drawImage(Image img, int x, int y, ImageObserver observer);

// 填充椭圆
public abstract void fillOval(int x, int y, int width, int height);

//
public abstract void dispose();

Graphics2D

//
public abstract Composite getComposite();
//
public abstract void setComposite(Composite comp);
//
public abstract void setStroke(Stroke s);
//
public abstract void setRenderingHint(Key hintKey, Object hintValue);

 

你可能感兴趣的:(Java GUI 绘图)