Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic