• 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

Serialization of a JTree

 
author
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!
I'm using an application where a JTree is dynamically built at runtime.
I need to add a function to save a "snapshot" of the jtree.
I think that serialization could be a valid option.
So I serialized the root DefaultMutableTreeNode and de-serialized it.

Unfortunately it doesn't work as I expected.

The jtree I re-build is incorrect (node names are missing, moreover application locks if I check one of the nodes)

Has anybody tried to save the state of a Jtree ?
Do I need to serialize also other components (which are linked with the jtree) ?
any advice will be very much appreciated....
thanks
Francesco
 
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic