public void mouseDragged(MouseEvent e) {
			Rectangle bounds = getBounds();
			Dimension d = getSize();
			Point p = e.getPoint();
			SwingUtilities.convertPointToScreen(p, e.getComponent());
			int dx = p.x - lastPoint.x;
			int dy = p.y - lastPoint.y;

			switch (dragType) {
			case DRAG_TOP:
				Point loc = getLocation();
				setLocation(loc.x + dx, loc.y + dy);
				break;
			case DRAG_TOP | DRAG_LEFT:
				invalidate();
				bounds.x += dx;
				bounds.y += dy;
				bounds.width -= dx;
				bounds.height -= dy;
				setBounds(bounds);
				validate();
				break;
			case DRAG_TOP | DRAG_RIGHT:
				invalidate();
				bounds.y += dy;
				bounds.width += dx;
				bounds.height -= dy;
				setBounds(bounds);
				validate();
				break;
			case DRAG_RIGHT:
				invalidate();
				setSize(d.width + dx, d.height);
				validate();
				break;
			case DRAG_RIGHT | DRAG_BOTTOM:
				invalidate();
				setSize(d.width + dx, d.height + dy);
				validate();
				break;
			case DRAG_BOTTOM:
				invalidate();
				setSize(d.width, d.height + dy);
				validate();
				break;
			case DRAG_BOTTOM | DRAG_LEFT:
				invalidate();
				bounds.x += dx;
				bounds.width -= dx;
				bounds.height += dy;
				setBounds(bounds);
				validate();
				break;
			case DRAG_LEFT:
				invalidate();
				bounds.x += dx;
				bounds.width -= dx;
				setBounds(bounds);
				validate();
				break;
			}

			lastPoint = p;

		}