• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

How to update the jtree depending upon the selection of parent node and child node in java

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Sir / Madam

Thank you in advance.

I had attached one gui.
In that gui left side you can see the jtree list and right side a table which is filled with the child nodes from the parent nodes created in the left.

I need to select any three parent nodes and its related child nodes and should display in another window of the same type.
How can i display only the selected parent node please help me with a sample example..

Hoping your earliest reply.
Screenshot-DWR-II-Product-Control-File-Selection.png
[Thumbnail for Screenshot-DWR-II-Product-Control-File-Selection.png]
screenshot of my question
 
Marshal
Posts: 75716
354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know. Do the Java™ Tutorials give you any help?
 
prajna pa
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Don't know. Do the Java™ Tutorials give you any help?



Please Help me Thank You in advance
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your current JTree is made up of x nodes. Your requirement is to display any 3 selected nodes.

In pseudo code.
1) Listen to node selection (If you read the link Campbell provided, you already know how)
2) Wait till the required condition is met (User has to select 3 nodes)
3) Build a new JTree with only these 3 nodes
4) Display the new tree (This should also be known to you you are already displaying it, albeit with more nodes)
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic