• 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

I'm looking for JTree examples

 
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to write a small application which stores notes. This app will be very small and consist of a JTree which represents the category and title of the notes and a JEditorPane to show and edit the note. I plan on creating a Note class which can be inserted into a Vector and serialized. The problem I am faced with is how to go about building the JTree nodes so that I can look at each note. Is there any real world JTree examples on the net which can help me understand how to go about building and using a JTree?
Thank you,
Frank
 
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Frank,
u can check out the sun's tutorial for JTree along with examples given there.
here is the link
http://web2.java.sun.com/docs/books/tutorial/uiswing/components/tree.html
regards
deekasha
 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, I will read through this.
Frank
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have an example of a tree view or any links that still work with a demo. Thanks.

Originally posted by Frank Hale:
Thank you, I will read through this.
Frank


 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone!

I have a question on JTree.

Consider this snippet of code from the link provided above.



I can't figure out how you could simply show this on the frame. I want to take it one step at a time.

Anyone could help me?
 
His brain is the size of a cherry pit! About the size of this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic