Programmatically enable editing a JTable cell on keystroke
问题 I would like to enable editing a JTable cell on a key, say F2. I know that by default double clicking will enable editing, but is there a way to bind that event to a key? I tried this link JTable edit on keypress but it doesn't work for me. Here is my code: public class DatabaseJTable extends JTable implements MouseListener { public DatabaseJTable(Object [][] data, Object [] columnNames) { super(data, columnNames); InputMap inputMap = this.getInputMap(JComponent.WHEN_FOCUSED); ActionMap