Results 1 to 5 of 5
  1. #1
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Exclamation DefaultTableModel vs AbstractTableModel

    Greetings,

    I am back.

    I am currently developing a personal time management system to my computer cafe rental. But I am getting confused to what I am to use between the two model.

    Both model seems to work fine. But I am ask what is more effective with regards to memory perfomance and record selection.

    Thanks.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by chyrl View Post
    Greetings,

    I am back.

    I am currently developing a personal time management system to my computer cafe rental. But I am getting confused to what I am to use between the two model.

    Both model seems to work fine. But I am ask what is more effective with regards to memory perfomance and record selection.

    Thanks.
    A DefaultTableModel uses Vectors of Vectors; Vectors synchronize when they have to manipulate or access their elements. An AbstractTableModel leaves that all to you. Pick your choice and don't worry too much about it now; premature optimization is the cause of all evil.

    kind regards,

    Jos

  3. #3
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    But if you were to pick between the two model?
    What would it be?
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by chyrl View Post
    But if you were to pick between the two model?
    What would it be?
    If I had to grab all my table elements from an external resource I'd use the abstract model and handle it all myself. If I have Vectors ready with my data I'd pick the default model. It all depends ...

    kind regards,

    Jos

  5. #5
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    Thanks for the hint.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

Similar Threads

  1. Replies: 3
    Last Post: 11-07-2009, 05:25 PM
  2. DefaultTableModel get the updated values
    By stylian in forum AWT / Swing
    Replies: 3
    Last Post: 11-01-2009, 12:26 AM
  3. DefaultTableModel problem
    By stylian in forum AWT / Swing
    Replies: 2
    Last Post: 10-31-2009, 04:23 PM
  4. Replies: 4
    Last Post: 04-01-2009, 02:03 AM
  5. RequestFocus on DefaultTableModel Particular Cell
    By yernikumar in forum AWT / Swing
    Replies: 1
    Last Post: 03-01-2009, 04:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •