This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes not able to insert node after the last node in the leaf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "not able to insert node after the last node in the leaf" Watch "not able to insert node after the last node in the leaf" New topic
Author

not able to insert node after the last node in the leaf

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
hi

i try to drag a component to a jtree.

that don't work for some case example:

root

A it's a leaf
B it's child of A

if i try to insert it like a child of B, it will be inserted like a child of the root




like you can see on the picture, i try to insert under: Effacer fichier but it's inserted under start...

it's like drop location it's not good

Any idea?

thanks


[Thumbnail for insert_test.jpg]

Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
if you want it to appear under 'Effacer fichier', you drop it onto Effacer fichier's node
i.e. in your pic, the node between Effacer fichier and the root

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 246
Michael Dunn wrote:if you want it to appear under 'Effacer fichier', you drop it onto Effacer fichier's node
i.e. in your pic, the node between Effacer fichier and the root



there is a bug

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560955#
 
jQuery in Action, 2nd edition
 
subject: not able to insert node after the last node in the leaf
 
Similar Threads
JTree selection events
JTree
JTree - drag and drop inside one tree - Java 1.6
Subtree in JTree
Drag cursor not changing, but drop succeeding.