import java.awt.Graphics; 
import java.applet.Applet;

public class DrawApplet extends Applet {
  int[] xPoints = { 30, 30, 150, 140, 90 };
  int[] yPoints = { 220, 290, 270, 230, 260 };

  public void paint(Graphics g) { // paint()のオーバーライド
    g.drawLine(30, 40, 150, 10);
    g.drawRect(30, 60, 50, 30); 
    g.fillRect(100, 60, 50, 30);
    g.drawRoundRect(30, 110, 50, 30, 20, 10);
    g.fillRoundRect(100, 110, 50, 30, 20, 10); 
    g.drawOval(30, 160, 50, 30);
    g.fillOval(100, 160, 50, 30);
    g.fillArc(70, 200, 50, 50, 0, 90);
    g.fillPolygon(xPoints, yPoints, 5);
  }
} 
