Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple Selection in JTree, Drag & Drop

843804Mar 25 2003 — edited Dec 27 2004
Hi 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?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2005
Added on Mar 25 2003
9 comments
507 views