public Button(int i) {
            super(currentfloorplan.getItem(i / N, i % N));
        	this.setOpaque(true);
            this.setBorderPainted(true);
            this.setBackground(Color.white);
                        
            this.x = i / N;
            this.y = i % N;
            
            switch(currentfloorplan.getType(this.x, this.y))
    		{
    			case("Wall"):
    				makeRed();
    				break;
    			case("Exhibit"):
    				makeGreen();    	
    				break;
    			case("Item"):
    				makeBlue();
    				break;
    			case("Space"):
    				makeSpace();
    			default:
    				break;            			
    		}
            
            this.addActionListener(new ActionListener() {
            	/**
            	 * when a square from the grid is clicked, this action listener
            	 * will set the new floor plan based on what is changed
            	 */
            	public void actionPerformed(ActionEvent e)
            	{
            		currentObjectX = x;
            		currentObjectY = y;
            		
            		int[] tempLocation = new int[2];
            		tempLocation[0] = x;
            		tempLocation[1] = y;
            		
            		newfloorplan.setFloorPlanType(x, y, newFloorPlanType);
            		newfloorplan.setFloorPlanItem(x, y, newFloorPlanItem);
            		
            		setText(newFloorPlanItem);
            		setToolTipText(newFloorPlanItem);
            		
            		switch(newFloorPlanType)
            		{
            			case("Wall"):
            				makeRed();
            				break;
            			case("Exhibit"):
            				makeGreen();            				
            				break;
            			case("Item"):
            				makeBlue();
            				break;
            			case("Space"):
            				makeSpace();
            			default:
            				break;            			
            		}
            		if(!newFloorPlanType.equals("Wall"))
            		{
            			newFloorPlanItem = "";
            			newFloorPlanType = "Space";
            		}
            	}
            });            
        }