public int update(MouseEvent event) {
		int mask = (event.getModifiersEx() & MouseEvent.BUTTON1_DOWN_MASK);
        boolean buttonDown = mask == MouseEvent.BUTTON1_DOWN_MASK;
        
        if (_pressed && !buttonDown) {
            _pressed = false;
            return _id;
        }

        if (event.getX() >= _rect.x && event.getX() <= _rect.x + _rect.width
         && event.getY() >= _rect.y && event.getY() <= _rect.y + _rect.height)
            _hover = true;
        else
            _hover = false;

        if (_hover && buttonDown)
            _pressed = true;
        else
            _pressed = false;
        
        return 0;
	}