Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I'm looking for JTree examples

 
Frank Hale
Ranch Hand
Posts: 230
  • Mark post as helpful
  • send pies
  • 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
 
deekasha gunwant
Ranch Hand
Posts: 396
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thank you, I will read through this.
Frank
 
bob morkos
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • 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

 
Karen Baog
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic