Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating a TreeTable with the given JTree - Screenshots attached

aneesahamedaaDec 17 2008 — edited Dec 19 2008
Hi experts,
I have developed a JTree .

The screenshot of my JTree is attached here

It works perfectly.

I need to convert it to a treetable as shown here

Can anyone please help by providing some tips so that I can create a treetable with this JTree .

The details for second and third columns(size, modified) corresponding to each folder and children I have.

I have given the optimized code which I used to develop this Jtree for your kind reference.

Ihave found something similar to my requirement here

The problem is that, literally, I do not know how to proceed in this regard for creating a treetable.

In the codes given below for my JTree there are 4 classes.

1) myTree.java --- the main class where I create the JTree
2) MyTreeCellRenderer.java --- cell renderer class for JTree
3) MyNode.java --- details(fetched from server) corresponding to each node of the tree
4) MyTreeNode.java --- the class extending DefaultMutableTreeNode

If I am not clear with any single line in any of the four classes, kindly say.

Kindly help.

Any help in this regard will be well appreciated with dukes.
Regards,
Anees
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2009
Added on Dec 17 2008
14 comments
429 views