• 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

Editable JTree????

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is driving me crazy.
I have extended JTree to add Drag Drop Functionality, which is working perfectly. I am using my own TreeModel which is extending DEfaultTreeModel and TreeNode extending DefaultMutableTreeNode.
My problem is that even though I am able to get a textfield as my node editor but any changes to the text are lost once I hit enter, tree nodes display the initial values.
I might be overlooking some basic things, could any body points me how to get a editable tree.
Regards,
Vijay
[ May 30, 2002: Message edited by: vijay kashyap ]
 
Ranch Hand
Posts: 1170
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont think you edit the node as much as you replace it. The treeModel contains the data, so editing the node will make no difference unless you replace the one the TreeModel will be showing, or edit the one the TreeModel will show.
Is your treeModel aware of the new edited node?
 
reply
    Bookmark Topic Watch Topic
  • New Topic