Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How to add into Jtable more than 100000 records

  1. #1
    Junior Member
    Join Date
    Jul 2011
    Posts
    25
    My Mood
    Fine
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default How to add into Jtable more than 100000 records

    I got Exception when I tried to add 100000 records into JTable by using DefaultTableModel
    what I have to use to fix this problem


  2. #2
    Junior Member
    Join Date
    Jul 2011
    Location
    Canada
    Posts
    11
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Re: How to add into Jtable more than 100000 records

    Try increasing your heap size. Use the -xmx option. If you're using Eclipse, add '-Xmx1g' into eclipse.ini.

  3. #3
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: How to add into Jtable more than 100000 records

    Please post the full exception. While it might be an OutOfMemoryException as the above post hints at, without the full stack trace we are left to guess.

  4. #4
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: How to add into Jtable more than 100000 records

    If you find that your large data set is affecting performance too much, you could consider using a paging JTable that holds only enough data to display, and reads on-demand for records outside that range. Brian Cole has posted the code for such a table at CodeRanch, including a link to his lazy viewport implementation.

Similar Threads

  1. Replies: 2
    Last Post: July 15th, 2011, 02:39 AM
  2. Program to read & write the Employee Records
    By arvindk.vij in forum Member Introductions
    Replies: 1
    Last Post: February 11th, 2011, 01:19 AM
  3. Program to read & write the Employee Records
    By arvindk.vij in forum Java Theory & Questions
    Replies: 1
    Last Post: February 11th, 2011, 01:19 AM
  4. How to download records of a table in XML format
    By rangarajank in forum JDBC & Databases
    Replies: 1
    Last Post: May 15th, 2010, 10:49 AM
  5. Unable to insert records
    By javaprogrammer11 in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: March 24th, 2010, 03:16 AM