• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

JTree and JEditorPane

Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ive been implementing a help system that uses a splitpane with a jtree in the left side (which allows the user to navigate to diferent help sections) and a jeditorpane in the right side (which will display the information).

ive setup to jtree with no problems and added the treeselectioneventlistener to listen and respond to changes in selection, but ive become a little unstuck as to how i am going to translate a selection, into loadin the appropriate document into the jeditorpane.

any ideas?

been working on this most of the afternoon there may be an easier way to do this but i have been trying to get the index of the selected node, its parent(if it has one) and its grandparent(if it has one) and so forth...



so if the user selects node 2 in root 2 i want to be able to get the index path to the node, i.e 0,2,1 (have my own plans of what i want to do with this path). getting he correct path is proving to be tricky.

any help would be appreciated

[ April 20, 2006: Message edited by: Deyna Cegielski ]
[ April 20, 2006: Message edited by: Deyna Cegielski ]
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic