• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TreeTable D&D

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello
i've created a jTreeTable based on the example given at sun website:
http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html

(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
 
reply
    Bookmark Topic Watch Topic
  • New Topic