Article View: borland.public.jbuilder.java.swing
Article #8026Drag and Drop within a JTree
From: John R. Moore
Date: Wed, 08 Nov 2000 00:00
Date: Wed, 08 Nov 2000 00:00
18 lines
1444 bytes
1444 bytes
After messing around with the JTree and DnD it appears that I can not drag an element of a tree. My goal was to allow one branch to be moved to another or move an entire branch hierarchy. I made a custom Tree the implemented the Source and Target but then it only listened to itself. Best case was that it would accept it's own component but had no idea where to put it. Next I tried to add the listener to a custom TreeNode (extends DefaultMutableTreeNode) but since it doesn't extend an java.awt.Component it can't be added as a listener. 1) are there any good packages that people have used that can already support this OR 2) do I build it with a custom TreeNode that implements MutableTreeNode and extends java.awt.Component? Thanks, John Moore
Technical Details
Message-ID:
<bwlO5.19695$Wq1.9550185@nnrp5-w.sbc.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,70fee859a91c5798,start X-Google-Attributes: gid111d45,public From: "John R. Moore" <johnmoore@pdsi-software.com> Subject: Drag and Drop within a JTree Date: 2000/11/08 Message-ID: <bwlO5.19695$Wq1.9550185@nnrp5-w.sbc.net> X-Deja-AN: 691410427 X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@pacbell.net X-Trace: nnrp5-w.sbc.net 973726855 63.196.249.98 (Wed, 08 Nov 2000 15:40:55 PST) Organization: SBC Internet Services X-MSMail-Priority: Normal NNTP-Posting-Date: Wed, 08 Nov 2000 15:40:55 PST Newsgroups: borland.public.jbuilder.java.swing