• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TreeTable D&D

Tal Goldstein
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i've created a jTreeTable based on the example given at sun website:

(it's not file system browser as in the example but a simple treetable)

im trying to add drag and drop feature to the treetable, but that doesnt work properly.
i've replaced the JTree used in the treeTable in a tree that supports d&d taken from: http://www.javaworld.com/javatips/jw-javatip97.html

i've also implemented: DragGestureListener, DropTargetListener,DragSourceListener on JTreeTable so each of the methods impelemented at the JTreeTable actually calls the same method on the tree.
for example the method dragGestureRecognized on the JTreeTable would call the method dragGestureRecognized on the tree.
after doing all that, the d&d on the treetable almost works...
the problem is that in some cases when i drag a node to an other node, it does add itself to that node, but it doesnt remove from where it was, and from checking the node that was supposed to be removed you can see that its father is null, and that it was removed from the childs array of its father, but from some reason the table is still showing it...
anyone has any idea why?
i tried to fire fireTreeStructureChanged on the table but that still doesnt work..
any help would be appreciated
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic