aspose file tools*
The moose likes Java in General and the fly likes tree structure like window explorer ... database driven Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "tree structure like window explorer ... database driven" Watch "tree structure like window explorer ... database driven" New topic
Author

tree structure like window explorer ... database driven

Sandeep. Oza
Ranch Hand

Joined: Feb 04, 2002
Posts: 66
Friends,
I have data in SQL database.. and i want to display it in tree structure as window explorer. database bean returns Hashtable.
Is there any site explaining this funda? ( without using Swing JTree Class).
S. Oza


Yes, Everything Is Possible
Greg Brouelette
Ranch Hand

Joined: Jan 23, 2002
Posts: 144
Well, I don't see any reason why you wouldn't want to use a JTree. Or is this one of those stupid teacher assignments where they say "Build a button without using JButton" or some such?
You could take a look at the source code in my sourceforge project at http://sourceforge.net/project/showfiles.php?group_id=10887
I have a class in there called QuickTree that builds a tree correctly if you pass it a slash delimited list of "directories" and the leaf object OR a vector of "directories" and the leaf object. It uses JTree, but it makes implementation of the JTree really easy.
That source code may get you closer to what you need.


For a good Prime, call:<br />29819592777931214269172453467810429868925511217482600306406141434158089
Sandeep. Oza
Ranch Hand

Joined: Feb 04, 2002
Posts: 66
Thankx Greg,
I shall go through your source codes ...
The reason i don't want to use JTree is that... It requires separate Plug in with Browser( Is it true.?.. I am not sure).
Also my data is stored in SQL database which returns two hashtables.. one returns fixed parent nodes( 5 no.s like A,B,C drives...) and second one all chil..sub child records... How to Nest Hashtable?
Let me first go through your source codes.
Good day.
S. Oza
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tree structure like window explorer ... database driven
 
Similar Threads
Who uses Trees?
Tree in JSF
JTree
tree in XML
Tree Structure like window explorer.. with database driven