simple jtreetable example

I have the following example data,

OrderID InsuredID PayedDate Amount
10         50            20070101           50
23         50            20070101           50
29         50            20070101           50
13         51            20070101           50
15         52            20070101           50
17         52            20070101           50

I want to create a jtreetable based on the data before.

that the tree show the insuredid and the total amount and when click the radio show the details.

for example
InsuredID TAmount
50            150
51              50
52            100

when clik on InsuredID 50 that show
InsuredID TAmount
50            150
10         50            20070101           50
23         50            20070101           50
29         50            20070101           50
51              50
52            100

I want a simple exampe please


thanks
glaAsked:
Who is Participating?
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
You probably need a JTable with a JTree cell renderer. See this:

http://java.sun.com/products/jfc/tsc/articles/treetable1/
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Can you show an example structure of your JTree? Should it look like:

Root
    -- OrderID 10
        -- InsuredID  50
        -- PayedDate 20070101
        -- Amount 50
    -- OrderID 23
0
 
glaAuthor Commented:
No I need a treetable

--50            150
    --10      20070101           50
    --23      20070101           50
    --29      20070101           50
-51              50
-52            100
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
0
 
glaAuthor Commented:
I am sorry I need a treetable because I have show 4 columns, and perhaps later is updated
0
 
glaAuthor Commented:
mayankeagle,

I saw this example (treetable) and is hard task for me to change it, I need a simple example..
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Its a small example on that site - can you come up with some code based on that?
0
 
Sreejith22Commented:
Hi mayankeagle,
Can you kindly help me develop a treetable please. I have been scratching my head for days with this treetable question.
Kindly help with some tps.
I have posted my code and question in
http://www.experts-exchange.com/Programming/Languages/Java/Q-23988250-Jtree-implementation-based-on-structure-given-ZZYNX-objects-CEHJ-and-others-help-needed.html

Please help.
Any help in this regard will be well appreciated with points.
Warm Regards,
Sreejith22
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.