import java.util.*;
import java.lang.*;
import java.awt.*;
import java.applet.*;
import point;



public class Estimator extends Applet {

    public void init() {
	;
    }
    public boolean handleEvent(Event evt)
    {
	if (evt.id == Event.MOUSE_DOWN)
	    {
		drawPoint((new point(evt.x, evt.y)), Color.blue);
	    }
	return true;
    }
    
    public void drawPoint(point p, Color c)
    {
	Graphics g = getGraphics();
	g.setColor(c);
	g.fillOval(p.x - 3, p.y - 3, 6, 6);
	g.setColor(Color.black);
	g.drawOval(p.x - 3, p.y - 3, 6, 6);
    }
    public synchronized void paint(Graphics g) {
	g.drawString("KILL ME", 75,70);
	g.setColor(Color.red);
	g.drawOval(50,50,100,30);
	g.setColor(new Color(50,0,128));
	
	point greg = new point(300,300);
	drawPoint(greg, Color.blue);
	greg.x = (150);
	greg.y = (150);
	drawPoint(greg, Color.green);
	
	int xp[] = new int[4];
	int yp[] = new int[4];
	xp[0] = 200; yp[0] = 200;
	xp[1] = 210; yp[1] = 200;
	xp[2] = 210; yp[2] = 210;
	xp[3] = 200; yp[3] = 210;
	g.fillPolygon(xp,yp,4);

    }
}
