This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Tree" Watch "Tree" New topic
Author

Tree

Gizzmo Zeuzere
Ranch Hand

Joined: May 11, 2001
Posts: 45
Hello !
I must make a tree but not a binary tree. I want that a node could have many nodes (more than 2)
Does anyone have an idea ? (with a javabean)
Stephane
[ November 17, 2003: Message edited by: Gizzmo Zeuzere ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

javax.swing.tree.DefaultTreeModel uses javax.swing.tree.TreeNode instances (see javax.swing.tree.DefaultMutableTreeNode) to create a tree whose nodes may have many children. DefaultMutableTreeNode also accepts an Object to contain whatever you wish to store in your tree. Sounds like it will fit the bill.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Gizzmo Zeuzere
Ranch Hand

Joined: May 11, 2001
Posts: 45
Thank u ! I test it !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tree
 
Similar Threads
MindQ's mock 32
jsp tree tag component ?
Please explain DownCast Code from K&B
Converting the tree to a file .
How to make a binary tree in JSP?