import java.awt.Graphics;
import java.awt.Font;
import java.awt.Color;

public class Hello extends java.applet.Applet
{
   String font;
   Font f;
   int size;

   public void init()
   {
      font = getParameter("font");
      size = Integer.parseInt(getParameter("size"));
      f = new Font(font, Font.BOLD, size);
   }

   public void paint(Graphics g)
   {
      int x[] = { 300, 310, 450, 280, 420, 300 };
      int y[] = { 300, 400, 300, 400, 300, 300 };
      int pts = x.length;

      g.setColor(Color.blue);  		// set the drawing color to blue
      g.drawLine(25,35,105,105);	// draw a line ((x,y)(x,y))

      g.setColor(Color.green);
      g.drawRect(40,40,100,100);	// draw a rectangle ((x,y) width height)
      g.setColor(Color.yellow);
      g.fillRect(120,150,150,167);	// draw a filled rectangle
      g.setColor(Color.red);
      g.draw3DRect(200,200,10,10,true);	// draw a 3D rectangle
      g.draw3DRect(220,200,10,10,false);

      Color neat = new Color(140,170,200);
      g.setColor(neat);
      g.fillPolygon(x, y, pts);		// draw a filled polygon

      g.fillOval(400,100,50,20);	// draw oval
      g.setColor(Color.black);
      g.drawArc(400,50,50,20,90,180);	// draw arc

      g.setFont(f);			// set a font
      g.setColor(Color.red);
      g.drawString("Hello", 5, 50);	// write text ->5 V50
   }
}