Multiple Selection in JTree, Drag & Drop
843804Mar 25 2003 — edited Dec 27 2004Hi everybody,
I was wondering if anyone knows how to implement Multiple Selection Drag and Drop in a JTree. I know that there used to be a bug in jdk 1.3 that would allow it, but I suspect 1.4 fixed that. I've implemented Single-selection just fine, but I'm trying do Multiple selection by drawing a selection rectangle and selecting whatever nodes are contained within that rectangle. So far I've implemented it by adding a MouseListener to my JTree, finding which rows are intersected by the rectangle and calling addSelectionRow() to add the TreePaths.
Is there an easier way to multiple selection now that the bug of 1.3(I hope) has been fixed?