/** Activates or deactivates Drag support on asociated JTree * component * @param active true if the support should be active, false * otherwise */ public void activate(boolean active) { if (this.active == active) { return; } this.active = active; if (GraphicsEnvironment.isHeadless()) { return; } getDropTarget().setActive(active); //we want to support drop into scroll pane's free area and treat it as 'root node drop' if( null == outerDropTarget ) { outerDropTarget = new DropTarget(view.getViewport(), view.getAllowedDropActions(), this, false); } outerDropTarget.setActive(active); }