How do I make the default behaviour of the Enter key map the behaviour of the Tab Key in a JTable?
Created May 4, 2012
Sandip Chitale
This depends on which implementation of TableCellEditor interface you are using. If you are using DefaultCellEditor class it depends on the Class of the TableColumn.
Basically you need to know what component is being returned by the -
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)In most cases it is JTextField. In that case you could install a new sub KeyMap with the original keymap as the parent. And in the actionPerfomed() do what the tab key does.