This is not a good strategy. You can only add a KeyListener to a component, and a cell is not a component. You can add it to the entire JTable, but that may not be useful depending on how you intend to use it.
Mitch Goldstein
Author, Hardcore JFC (Cambridge Univ Press)
mdgoldstein@hotmail.com
You can add a key listener to the CellEditor, or a FocusListener etc..
There is one cellEditor (by default) for each column and it is used for
all the rows in the column (so only put one on the editable columns)
JTextField f = new JTextField();
f.addKeyListener(new KeyListener() ....
// Set the click count to 1 for editing in the cell
DefaultCellEditor cell = new DefaultCellEditor(f);
catalogTable.getColumn(YOUR_COLUMN_NAME).setCellEditor(cell);
You could try that IF you need to add a keylistener
hope this helps