• 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 in Browser

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a clarification regarding usage of JTree in JApplet.
The problem is described below.
Can anyone provide a sol.
Thanks in advance.
Problem Description :

JTree is contained in JApplet.
This JApplet is loaded in a Browser.
The user can expand the JTree nodes.
When the user clicks on Refresh button of the browser, the nodes get shrunk and only the Root node becomes visible.
The user cannot get back the expanded tree structure.

How to maintain the expanded state of the tree nodes even after refresh.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried making the tree expand on loading of the jtree?

perhaps something like this?
jTree.expandPath(new TreePath(root.getPath()));

-Casen
 
prabha palani
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The user would have expanded a few nodes. All other nodes would appear in collapsed state. When user clicks on browser refresh button , i should be able to display the Tree structure as the user left (a few nodes expanded, a few nodes collapsed). How do i maintain the expanded / collapsed state of the tree nodes even after browser refresh.
 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic