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

  • Home
  • SEARCH
  • 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 6592117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:30:48+00:00 2026-05-25T17:30:48+00:00

What is the appropriate method to detect changes made to an entity through an

  • 0

What is the appropriate method to detect changes made to an entity through an editable cell in a JTable? I would like to get the entity which the changes occurred so that I can commit the changes using JPA (eclipselink).

So far I tried a TableModelListener implementation. However, it seems that the TableModelEvent does not provide a reference to the underlying entity (or data provider of the table) object but only to the value (Object) which has changed.

Having a background in AS3, I’m used to writing event driven code. But, what is the right approach to implement this in Java?

  • 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-25T17:30:49+00:00Added an answer on May 25, 2026 at 5:30 pm

    Either inspect the row of the TableModelEvent fired by the modification, and ask your model the entity at this row, or fire another dedicated event when a cell is updated, containing the updated entity.

    See the Swing tutorial on tables for how to create your own table model, extending AbstractTableModel. It’s almost always better than using the default one, and I thought you were doing it already, because you said that “changes [were] made to an entity through an editable cell”.

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

Sidebar

Related Questions

What is the appropriate method to get the already-initialized javascript to interact with content
I have a webservice that, if appropriate, sends out error messages. I would like
I believe the factory method design pattern is appropriate for what I'm trying to
I have a simple setter method for a property and null is not appropriate
One of the appropriate uses for sqlite3 is in-memory databases. This sounds like a
could anybody possibly give me some pointers as to the appropriate method to use
Given a photograph of a hand, I'm trying to determine the most appropriate method
What's the most appropriate way to detect if a socket has been dropped or
What is the most appropriate method to change the system date (on Windows) programmatically
It seems that Java can't choose the most appropriate method implementation based on the

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.