Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

simple jtreetable example

Posted on 2007-03-26
10
Medium Priority
?
1,552 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
8 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

772 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