This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

how to fill the jtree with the last modified value ?

 
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need your help guyz i have coded a program with Jtree which is just displaying two nodes and 2 leaf nodes in one node and one is root
and also i have implemented a code within that to change the name of any leaf node dynamically means user can change the name as per his needs
till now it works fine , i mean the code does his job well by allowing to edit the nodes and rename them , but problem occurs when i restart that application the earlier modifications are just lost
and that was very easy to catch it was happening because i was filling the tree with the hard coded values from the constructor ...but i need to know how to replace my modified value with the hard coded ones because at any cost i need to fill the tree at start up so that user can see all its files
but how is this possible to retrieve the last change and replace it when we are filling the tree at start up so that our users can see the modified name of any file ?

code is
 
naved momin
Ranch Hand
Posts: 692
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

naved momin wrote:i need your help guyz i have coded a program with Jtree which is just displaying two nodes and 2 leaf nodes in one node and one is root
and also i have implemented a code within that to change the name of any leaf node dynamically means user can change the name as per his needs
till now it works fine , i mean the code does his job well by allowing to edit the nodes and rename them , but problem occurs when i restart that application the earlier modifications are just lost
and that was very easy to catch it was happening because i was filling the tree with the hard coded values from the constructor ...but i need to know how to replace my modified value with the hard coded ones because at any cost i need to fill the tree at start up so that user can see all its files
but how is this possible to retrieve the last change and replace it when we are filling the tree at start up so that our users can see the modified name of any file ?

code is


done solved
 
Proudly marching to the beat of a different kettle of fish... while reading this tiny ad
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic