I have a TableCellEditor
that overrides stopCellEditing
to validate the content. I would like to interact with the table as part of this validation. Is there a way to determine what table we are editing? I thought it would be getParent()
, but it seems sometimes getParent()
is the table and other times it's null.
Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected,
int row, int column)
The method of TableCellEditor
interface has the first parameter JTable
instance. SO you can keep the table in a field and use it in the stopCellEditing