?
Solved

simple jtreetable example

Posted on 2007-03-26
10
Medium Priority
?
1,549 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 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