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
Solved

Report in SWING

Posted on 2007-03-25
11
352 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Maven Project: Hibernate Dependencies Conflict 10 39
table example 4 32
javap not working 8 58
Why my table column Id is not passed to java object? 4 44
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

860 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