import java.awt.*;

public class JavaMan extends java.applet.Applet {

    public void init() {
        setBackground(Color.yellow);
    }

    public void paint(Graphics screen) {

        screen.setColor(Color.black);
        screen.drawRoundRect(10,10,size().width-20,size().height-20,15,15);

        screen.setColor(Color.gray);
        screen.fillRect(200,90,100,100);

        screen.setColor(Color.blue);
        for (int x = 200; x < 300; x += 5)
            for (int y = 90; y < 190; y += 5)
                screen.drawRect(x,y,5,5);

        screen.setColor(Color.black);
        screen.drawLine(200,110,170,115);
        screen.drawLine(170,115,160,90);
        screen.drawLine(160,90,150,94);
        screen.drawLine(160,90,153,85);
        screen.drawLine(160,90,158,83);
        screen.drawLine(160,90,163,84);

        screen.setColor(Color.white);
        screen.fillOval(220,30,60,60);

        screen.setColor(Color.green);
        screen.fillOval(245,45,5,5);
        screen.fillOval(255,45,5,5);

        screen.setColor(Color.black);
        screen.fillRect(245,65,15,15);

        screen.setColor(Color.magenta);
        int[] xPoints = { 205, 305, 240, 205 };
        int[] yPoints = { 43, 40, 15, 43 };
        int points = 4;
        screen.fillPolygon(xPoints, yPoints, points);
    }
}
