import java.awt.*;
import java.applet.*;


public class Applet1 extends Applet
{
	
	public int pos;
	public void init()
	{
		pos=1;
		setBackground(Color.yellow);					  
		setForeground(Color.red);					 
	}
	public void paint (Graphics g)
	{
	
		switch(pos)
		{
		case 1:	g.drawRect(170,120,30,30);
		g.drawString("Hola",178,136);
		break;
		case 2: g.drawRect(120,170,30,30);
		g.drawString("Hola",128,186);
		break;
		case 3: 
		g.drawRect(170,170,30,30);
		g.drawString("Hola",178,186);
		break;
		case 4:
		g.drawRect(120,120,30,30);
		g.drawString("Hola",178,186);
        
		case 5:
		g.drawRect(170,230,30,30);
		g.drawString("Hola",128,136);
        
		case 6:
		g.drawRect(230,170,30,30);
		g.drawString("Hola",128,136);
        
		
		}
   	}
	
	public boolean mouseMove(Event e, int x, int y)
	{
	 if(x>170&&x<200&&y>=120&&y<=150)
	 {pos=2;repaint();return true;}
		
		if(x>120&&x<150&&y>=170&&y<=200)
	 {pos=3;repaint();return true;}
		
		if(x>170&&x<200&&y>=170&&y<=200)
	 {pos=1;repaint();return true;}
	
   	if(x>200&&x<230&&y>=170&&y<=200)
	 {pos=1;repaint();return true;}	
		
	if(x>170&&x<200&&y>=200&&y<=230)
		{pos=1;repaint();return true;}	
	
	if(x>200&&x<230&&y>=230&&y<=270)
	 {pos=1;repaint();return true;}	
	return false;
	}
}