Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3958180
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:34:48+00:00 2026-05-20T02:34:48+00:00

I have this JTable having an AbstractTableModel as its model. The initial contents are

  • 0

I have this JTable having an AbstractTableModel as its model.
The initial contents are parsed to a two-dimensional array Object from a ArrayList generic to a Entity of the system. Also in the model, isCellEditable is overriden with respect to data integrity.
After setting the model, I have set some cell editor with specified swing objects.

My problem now is that. How could I fill-up the column[0] of the table once changes on an empty row occurs. Also, once updates happens to the empty row, another empty row will automatically be added to the JTable.

Am I going to use a TableModelListener? How could I implement it without resetting the model of the JTable again.

Most likely this is similar to Microsoft Access – Form presentation to tables/queries.

Your response and comment will be highly appreciated.

Thanks,
Cyril H

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:34:48+00:00Added an answer on May 20, 2026 at 2:34 am

    I have this JTable having an AbstractTableModel as its model.

    THe AbstractTableModel is not the tables model. You are extending AbstractTableModel to implement the model storage and other methods that need to be implemented.

    I would just use the DefaultTableModel. It already implements these methods and it provides an addRow(…) method that allows you to dynamically increase the number of rows in the model.

    Am I going to use a TableModelListener?

    That is one way. Every time the data in a cell changes you check the entire row to see if it is full. If it is the last row in the table, then you can just invoke the addRow(…) method on the DefaultTableModel to add another row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JTable which is loaded from a data-structure using table model.The data-structure
I have implemented a custom Table Model as follows: public class MyTableModel extends AbstractTableModel
I'm having small problem (I guess) of showing the JTable panel. I have class
I followed some tips in this guide: JTable with horizontal scrollbar but still having
I have a JTable instance, containing a number of rows. The columns in this
I have an object responsible for persisting JTable state to disk. It saves/loads visible
I have a JTable and a TableModel that extends AbstractTableModel . I would like
I currently have something like this: $(.jtable tbody td).not(.DeleteLicense).hover( How can I use delegate
I have this code in jQuery, that I want to reimplement with the prototype
I have this idea for a free backup application. The largest problem I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.