void (MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_DRAGGED && myHint != null && myInitialPress != null) { Point location = myHint.getLocationOnScreen(); myHint.setLocation(new Point(location.x + e.getX() - myInitialPress.x, location.y + e.getY() - myInitialPress.y)); e.consume(); return; } super.processMouseMotionEvent(e); }