Solved

simple jtreetable example

Posted on 2007-03-26
10
1,543 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:gla
10 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 18793769
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
 

Author Comment

by:gla
ID: 18794192
No I need a treetable

--50            150
    --10      20070101           50
    --23      20070101           50
    --29      20070101           50
-51              50
-52            100
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 18794425
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:gla
ID: 18794476
I am sorry I need a treetable because I have show 4 columns, and perhaps later is updated
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 500 total points
ID: 18794764
You probably need a JTable with a JTree cell renderer. See this:

http://java.sun.com/products/jfc/tsc/articles/treetable1/
0
 

Author Comment

by:gla
ID: 18798165
mayankeagle,

I saw this example (treetable) and is hard task for me to change it, I need a simple example..
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18801185
Its a small example on that site - can you come up with some code based on that?
0
 

Expert Comment

by:Sreejith22
ID: 23206145
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question