} else {  try {  if (e.getModifiers() == 0) { final int[] selected = lisBoardsSelected.getSelectedIndexes(); for (int i = 0; i < selected.length; i++) { lisBoardsSelected.deselect(selected[i]); } } lisBoardsSelected.select(Integer.parseInt(e.getActionCommand())); refreshSelectAllCheck(); } catch (NumberFormatException ex) { } }
}
    public void actionPerformed(ActionEvent e) {                if (e.getSource() == butChange || e.getSource() == lisBoardsAvailable) {            if (lisBoardsAvailable.getSelectedIndex() != -1) {                change(lisBoardsAvailable.getSelectedItem());            }        } else if (e.getSource() == butUpdate) {            apply();        } else if (e.getSource() == butOkay) {            send();        } else if (e.getSource() == butCancel) {            this.setVisible(false);        } else if (e.getSource() == butRandomMap) {            randomMapDialog.setVisible(true);        } else {            // number button?            try {                // TODO: can't this be easier?                if (e.getModifiers() == 0) {                    final int[] selected = lisBoardsSelected.getSelectedIndexes();                    for (int i = 0; i < selected.length; i++) {                        lisBoardsSelected.deselect(selected[i]);                    }                }                lisBoardsSelected.select(Integer.parseInt(e.getActionCommand()));                refreshSelectAllCheck();            } catch (NumberFormatException ex) {            }        }    }