Solved

Report in SWING

Posted on 2007-03-25
11
356 Views
Last Modified: 2010-03-31
Hello,

I am developing SWING app using jdk 1.4.2 and HSQLDB.

Well, it works fine now. However, in near future, the data in HSQLDB may grow up to 1 million records or even more.  I am afraid that this may slow down or even *crash* the application in the future as I have one report feature where it displays out the data from one table in DB. This table is the table that contains more than 1 million records.

Now, I am thinking to use JFreeReport to display the report.

What would you think or suggestion?

Thanks
David
0
Comment
Question by:suprapto45
  • 6
  • 5
11 Comments
 
LVL 16

Author Comment

by:suprapto45
ID: 18790647
I will have a look at this thread later on.

David
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18790726
Yes, I guess you should move on to JFreeChart. I thought you werre already using it
0
 
LVL 16

Author Comment

by:suprapto45
ID: 18790750
>>"Yes, I guess you should move on to JFreeChart. I thought you werre already using it"
Do you mean JFreeReport?

I am about to implement the JFreeReport. However, as far as I know, using JFreeReport, you need to populate the TableModel first then pass it to the report. Has JFreeReport been able to handle huge data as 1 million records? If so, what should I do to minimize the impact of the memory exhaustion of my application?

Or do you have any other alternatives instead of querying the DB for the entire 1 million records?

Thanks
David
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!

 
LVL 30

Expert Comment

by:Mayank S
ID: 18790765
Sorry, yes I meant JFreeReport.

>> Has JFreeReport been able to handle huge data as 1 million records?

Will check and let you know. are you thinking of implementing pagination?
0
 
LVL 16

Author Comment

by:suprapto45
ID: 18790972
>>"Will check and let you know. are you thinking of implementing pagination?"
If in J2EE yes. That's why I am confused in J2SE. What do you people normally do to handle this kind of situation in J2SE? Do you use pagination or any other thing? I may not have known few technologies in J2SE as I always deal with J2EE.

This is my first project in SWING :).

David
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 500 total points
ID: 18793643
I personally use a JTable and add a Next/ Previous button. Upon hitting of the next button, hit the DB again and retrieve the information, update the model. Your UI/ app could crash if you retrieve millions of record in the memory in 1 shot. Though when it comes to UI, I work on the EE side more than J2SE too.
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 500 total points
ID: 18793661
0
 
LVL 16

Author Comment

by:suprapto45
ID: 18797701
Thanks mayank,

I'll have a look at it later.

David
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18802312
You needn't accept before trying....
0
 
LVL 16

Author Comment

by:suprapto45
ID: 18805514
mayankeagle,

Sorry for any delay in replying.

Well, at this point of time, I really have not 100% sure to go ahead with any solution. I am still thinking the best way on this if it happens in the future. So any link / feedback would extremely be useful for me as I am still considering all the factors. Hence your suggestion and feedback are valid to be accepted.

Thanks again.
David
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18805725
Ok, thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
jboss wildfly 10.1 10 399
eclipse console opening separately 2 35
add projects t working set in maven 2 37
Java List 4 32
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

685 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