public IconJButton(BufferedImage img, iconType type){
		this.type = type;
		this.disabled = new ImageIcon(img
    			.getSubimage(0, 0, IMAGE_SIZE, IMAGE_SIZE));
		this.enabled = new ImageIcon(img
    			.getSubimage(IMAGE_SIZE, 0, IMAGE_SIZE, IMAGE_SIZE));
		this.highlighted = new ImageIcon(img
    			.getSubimage(2*IMAGE_SIZE, 0, IMAGE_SIZE, IMAGE_SIZE));
		this.selected = new ImageIcon(img
    			.getSubimage(3*IMAGE_SIZE, 0, IMAGE_SIZE, IMAGE_SIZE));
		setIcon(disabled);
		setPreferredSize(new Dimension(32, 32));
		
		addMouseListener(new MouseAdapter() {
            public void mouseEntered(MouseEvent evt) {
            	highlight();
            }
            public void mouseExited(MouseEvent evt) {
            	if (status==statusType.DISABLED){
            		setEnabled(false);
            	}
            	else if(status==statusType.ENABLED){
            		enableImage();
            	}
            	else if(status==statusType.SELECTED){
            		select();
            	}
            	//enableImage();
            }
            public void mousePressed(MouseEvent evt) {
            	select();
            }
            public void mouseReleased(MouseEvent evt) {
            	if (Controller.changedMode==true){
            		if (status==statusType.DISABLED){
            			setEnabled(false);
                	}
                	else if(status==statusType.ENABLED){
                		enableImage();
                	}
                	else if(status==statusType.SELECTED){
                		select();
                	}
            	}
            	else {
	            	if (status==statusType.DISABLED){
	            		setEnabled(false);
	            	}
	            	else {
	            		enableImage();
	            	}
            	}
            }
        });
		
	}