• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

uploading data into JTable

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Let me introduce to you as Sainath Veepuri. 'am a beginner in JAVA. I found this site interesting,
hence 'am posting my doubt.
'am currently using a JTable in my program to show the information of each & every student in the state.
For this I have created a class called StudentInfo.java. This class contains the complete information
about the student like student name,age,sex,blood group,dob,class,organization,place.... etc (25 fields are there)
We get a raw file contaning thousands of student data.
eg;
( Student_raw_file : Contains 25,000 students data --> 25 fields for each student. )

name : x, age : 15, sex : m, .... , name : y, age : 15, sex : f, .... etc atc.
For this I wrote a parser, which reads the complete information.
Every time I find a new student in the file, i create a new StudentInfo() and set name,age,sex .. etc.
and finally I place this StudentInfo() object in a vector. So, if there are 25,000 students...then 25,000 vectors containing
different StudentInfo() objects would be created in order to display all the 25,000 students info in my JTable.
This mechanism worked. But then, it is taking a long time to upload into the JTable.
Is there any other mechanism with which I could improve the performance??
Thanks & Regards,
Sai :-)
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't display all 25000 at one time. Display the first xxx number and create scrolling to view the remaining items.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic