import java.awt.*;
import java.applet.*;



public class Applet1 extends Applet
{
	public int posx, posy;
	
	public void init()
	{
		posx=posy=0;
		setBackground(Color.black);
		setForeground(Color.white);
	}
	
	public boolean mouseUp(Event e, int x, int y)
	{
		if(x>=100&&x<=200)
		{
		if(y>=100&&y<=150)
		{
			setBackground(Color.blue);
			setForeground(Color.white);
			repaint();
			return true;
		}
		if(y>=150&&y<=200)
		{   setBackground(Color.yellow);
			setForeground(Color.red);
			repaint();
			return true;
		}
		}
		return false;
}
		
	public void paint(Graphics g)
	{
	
	g.drawRect(100,100,100,100);
	g.drawLine(100,150,200,150);
	g.drawString("Azul",125,125);
	g.drawString("Amarillo",125,175);
}
}