Forums Register Login

Jtree implementation - based on structure given

+Pie Number of slices to send: Send
Hi all,
I am trying to develop a tree in the following structure.


I have all those folder names and file names inside a vector.I can check whether these names are associated with a file or a folder using a method. The folders can or cannot have children.The folder content will be obtained from the database each time a folder is expanded(this time also, i get the names of the contents inside the particular folder in a vector and I do the same procedure to check whether the name is associated with a file or folder) .

How to implement this?
I made a thorough study from http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html#display
and referred and modified the examples given there to suit my requirements, unfortunately nothing seems to work for me properly(according to my requirement above). If needed I will post the stupid codes developed by me.
Please provide some tips, links or basic codes based on which i can develop the rest.
Regards,
Anees
+Pie Number of slices to send: Send
the 10 replies here didn't help, or do you just want people to duplicate
what's already been posted?

http://forums.sun.com/thread.jspa?threadID=5337544
+Pie Number of slices to send: Send
I just sought a second opinion. I never thought that forums.sun.com and javaranch were such closely coupled.
Also, can you give an answer for the 9th reply there?
+Pie Number of slices to send: Send
We're not "closely coupled," but it is only courteous to tell us you are posting on Sun and to tell the people on Sun you are posting on JavaRanch. Some people, as you will have seen, post on both sites.
+Pie Number of slices to send: Send
> Also, can you give an answer for the 9th reply there?

I could, and there is a reasonably simple solution to your problem,
as has been hinted at by the person trying to help you on the sun forum,
but I won't.
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 938 times.
Similar Threads
Adding an image to a JTree node
How to set Images for the leaf nodes in the Jtree
Radiobuttons in JTree
getting icon from jtable cell
I'm looking for JTree examples
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:17:58.