diff -r 1978eaf429de -r 64e564c2f069 src/main/java/cz/frantovo/rozsireneatributy/gui/Panel.java --- a/src/main/java/cz/frantovo/rozsireneatributy/gui/Panel.java Sat Dec 16 23:54:00 2023 +0100 +++ b/src/main/java/cz/frantovo/rozsireneatributy/gui/Panel.java Tue Dec 19 00:47:41 2023 +0100 @@ -20,6 +20,7 @@ import cz.frantovo.rozsireneatributy.CSV; import java.awt.Toolkit; import java.awt.datatransfer.StringSelection; +import java.awt.event.KeyEvent; import java.io.IOException; import java.io.StringWriter; import java.util.ResourceBundle; @@ -27,6 +28,7 @@ import java.util.logging.Logger; import javax.swing.JOptionPane; import javax.swing.JTable; +import javax.swing.KeyStroke; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; @@ -62,7 +64,7 @@ tabulka.setRowHeight((int) (tabulka.getRowHeight() * 1.3)); - /** Výběr aktuálního atributu v tabulce */ + // Výběr aktuálního atributu v tabulce: tabulka.getSelectionModel().addListSelectionListener( new ListSelectionListener() { @@ -78,6 +80,10 @@ } } }); + + // Buňky tabulky editovatelné po stisku mezerníku: + tabulka.getInputMap() + .put(KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, 0), "startEditing"); } private void nastavEditor() {