public void mouseMoved(MouseEvent e) {
            int y = e.getY();
            if (defaultCursor == null) {
                defaultCursor = getCursor();
            }
            thresholdPos = (int) (getHeight() - (threshold * (getHeight() - 1)));//-
            if (y >= thresholdPos - 5 && y <= thresholdPos) {
                if (dragMode == OFF) {
                    dragMode = NEARBY;
                    setCursor(movingCursor);
                }
            } else {
                if (dragMode == NEARBY) {
                    dragMode = OFF;
                    setCursor(defaultCursor);
                }
            }
        }