怎么就错了呢

来源:百度知道 编辑:UC知道 时间:2024/05/14 01:48:51
import java.awt.*;
import java.applet.*;

public class M5 extends Applet {
public void paint(Graphics g) {
g.setColor(Color.RED);
g.fillPolygon(50,100,150,120,3);
}
}

abstract void fillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Fills a closed polygon defined by arrays of x and y coordinates.

void fillPolygon(Polygon p)
Fills the polygon defined by the specified Polygon object with the graphics context's current color.

没有你那样的