void (@NotNull DnDSource source, @NotNull JComponent component) { component.putClientProperty(SOURCE_KEY, source); DragSource defaultDragSource = DragSource.getDefaultDragSource(); defaultDragSource.createDefaultDragGestureRecognizer(component, DnDConstants.ACTION_COPY_OR_MOVE, myDragGestureListener); }