Solved

simple jtreetable example

Posted on 2007-03-26
10
1,538 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:mayankeagle
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
 

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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 30

Accepted Solution

by:
mayankeagle 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:mayankeagle
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Basics of Drool Rule Engine with few samples 2 39
bunnyEars2 challenge 6 66
countAbc challenge 9 49
countHi2 challenge 7 44
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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:

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now