Construct the drawing object p = new Polygon(); // make a triangle. p.addPoint(0,100); p.addPoint(200,0); p.addPoint(200,200);
p = new Polygon(); // make a triangle. p.addPoint(0,100); p.addPoint(200,0); p.addPoint(200,200);
return new Dimension(210, 210);
g.setColor(Color.black); g.drawPolygon(p); g.setColor(Color.gray); g.fillPolygon(p);