JTable editing - how to be informed when a cell STARTS editing?
843806Dec 11 2008 — edited Dec 12 2008I have a JTable with editable cells (containing Strings). I want to be informed when an editing operation begins (either by user gesture, or programmatically by the "JTable.editCellAt(row, column)" method). I want to record the initial value in that cell, so I can respond appropriately if the value changes after editing has stopped.
I note the existence of the CellEditorListener interface; however, it only has callback functions for "editingStopped" and "editingCanceled". I need a comparable "editingStarted".
I cannot simply use a ListSelectionListener to listen for new selection events, because the existence of the "editCellAt" method makes it possible to start editing a cell without explicitly changing its selection state.