 
import java.awt.*;                                                                                                     
import java.applet.Applet;                                                                                             
import java.awt.event.*; 



class Box {
	Graphics g;
	Color mycolor;
     	int myx,myy;  // Coordinates of box
     	int width;
     	int height;
     	boolean Clicked;
     	public Box() 
    	{
     		myx = 0;
     		myy = 0;
     		height = 0;
     		width = 0;
		mycolor = Color.gray;
		Clicked = false;
      	}


   	public Box(int x1, int y1, int height1, int width1, Color colors)
    	{
     		myx = x1+150;
     		myy = y1+100;
     		height = height1;
     		width = width1;
		mycolor = colors;
		Clicked = false;
    	}

   	public void display(Graphics g)
    	{
		this.g = g;
      		//set the color to the color stored in backgroundcolor
      		g.setColor(mycolor);
      		g.fillRect(myx, myy, height , width); 
      
      		//drawing boarder in each box if the boarder value is true
      		
      		//set the boarder color to the color stored in boardercolor
      		g.setColor(Color.white);
      		g.drawRect(myx,myy,height, width);
    }



 public void setColor(Color mytempcolor)
      {
        mycolor = mytempcolor;
      }
public Color getColor()
      {
        return mycolor;
      }


public void setClicked()
{
	Clicked = true;
}
public void unClicked()
{
	Clicked = false;
}
   public boolean ismoved (int mousex, int mousey)
        {

           	if  (mousex > myx  && mousex < (myx + width))  
              		if (mousey > myy && mousey < (myy + height))
                		return true;
		return false;
        } 










}



