Thursday, October 7, 2010

Java JTable Cell Editors

I'm trying to understand JTable cell editors so I'll use this post to organize my thoughts to help my brain understand this new concept. This is a work in progress...

First of all, let's cover the sequence of events that take places before a cell editor is called:

  1. JTable detects a mouse click over one of its cells and calls isCellEditable() in TableModel.
  2. If the cell is editable according to TableModel, the CellEditor's isCellEditable() method is called as well. This second method call determines whether the cell is single or double-clicked (which is required to make a editable cell, well editable).

No comments: