Java Utililty Methods JTable Select

List of utility methods to do JTable Select

Description

The list of methods to do JTable Select are organized into topic(s).

Method

voidspaceSelection(final JTable jTable)
Let a CheckBoxTableModel using JTable select a value by pressing space on the keyboard.
jTable.addKeyListener(new KeyAdapter() {
    @Override
    public void keyReleased(KeyEvent evt) {
        if (evt.getKeyCode() != KeyEvent.VK_SPACE || jTable.getSelectedRow() == -1)
            return;
        if (jTable.getValueAt(jTable.getSelectedRow(), 0) == Boolean.TRUE) {
            jTable.setValueAt(false, jTable.getSelectedRow(), 0);
        } else {
...