DragGestureListener dragGestureListener = new DragGestureListener() {
public void dragGestureRecognized(DragGestureEvent event) {
ComponentSelector.this.dragGestureRecognized(event);
}
};
DragSource dragSource = DragSource.getDefaultDragSource();
dragSource.createDefaultDragGestureRecognizer(this.tree, DnDConstants.ACTION_COPY_OR_MOVE, dragGestureListener);
this.dragSourceListener = new DragSourceAdapter() {
// Overwrite some methods when needed.
};