void (@NotNull DropTargetDragEvent e) { Point location = e.getLocation(); getCaretModel().moveToLogicalPosition(getLogicalPositionForScreenPos(location.x, location.y, true)); getScrollingModel().scrollToCaret(ScrollType.RELATIVE); }