• Post Reply Bookmark Topic Watch Topic
  • New Topic

loading resultsets in multiple threads in a swing application

 
Seshadri Srinivas
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am in the process of developing a J2EE/Swing application.

I need to load huge chunks(approx 2000 records) of result set data into a swing grid.

How do I speed up this loading huge chunk of data into the swing grid?

Is there a way that I use threads, where in one thread populates a set of data and as the user moves the scroll bar down, i start another thread which loads another set of data and which continues untill all the data loading is finished. One of my friends gave me this idea. but i really dont how to realise this in the code. Is there any such code available on the web or did anyone had this task before and tried it the same way.

Help pls.
Seshadri Meharwade Srinivas
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I think the solution you are after might be too complex. A simpler solution would be to page the data. So display 100 results and have a "Next 100" button and when that is clicked, update the table with 100 more records or simply display 101 - 200 records. Of course, you would also need a "Previous" button so they could go back.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!