• 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

JTree DnD multiple node selections?

 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings Ranchers,

I'm trying to implement Drag N Drop feature on my JTree.

So far:
I have got a crude version of my app running
I can drag and drop a tree_node from one place to another with in the tree.

However I cannot select mutliple nodes with current arrangement. The only way that I know to make multiple selections is using CTRL button. (Press Control and click on nodes to make selection.)

As soon as user tries to drag a group of selected nodes; the selections vanish and only selection remains.

Has anybody faced similar problems?
Any solutions/workarounds/suggestions to this problem?

TIA
Ravi
 
Ravi Sathish
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solution is pretty simple

You just need to make Component ready for Drag&Drop

tree.setDargEnabled(true);
 
reply
    Bookmark Topic Watch Topic
  • New Topic