I have a table model that is populated by live (external) data source that updates every xx seconds. The data is displayed in a JTable
.
The user can override the data in the table cell through an celleditor that extends the AbstractCellEditor
. If the user clicks away, the code checks to see if the new value equals the value in the table model. If it doesn't, it assumes it's an override.
The problem is, say a you click on a field, don't change the value, and external data source updates the table model in the meantime, the code thinks the user set an override using the old value rather than just cancelling the override.
What is the standard logic and implementation to do this?