Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail From: "Thomas Kellerer" Subject: JTree, SelectionModel and Message-ID: <6epi8kF86fnrU1@mid.individual.net> X-Comment-To: comp.lang.java.gui Newsgroups: comp.lang.java.gui Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] Lines: 26 Date: Wed, 27 Apr 2011 15:47:04 GMT NNTP-Posting-Host: 96.60.20.240 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1303919224 96.60.20.240 (Wed, 27 Apr 2011 10:47:04 CDT) NNTP-Posting-Date: Wed, 27 Apr 2011 10:47:04 CDT Organization: TDS.net Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3813 To: comp.lang.java.gui Hi, I have a JTree where I allow multiple leafs to be selected and moved from their original parent node to another node. This is working fine - basically. The problem is with the SelectionModel: after I have selected e.g. 3 leafs, and then try to drag them to a different parent node, the first click that is required to start the drag will de-select all leafs except the one that I clicked on. When I hold down the Ctrl-Key while clicking everything is fine (drag & drop works without problems, it's the selection that is the problem) Now my question is: how do I configure the DefaultTreeSelectionModel to change the selection on the mouseReleased event not on the mouseClicked event? Basically I only want the selection to change when the user really clicked (pushed & released) the mouse button, not when pressing and keeping the button pressed Regards Thomas --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24