} else if (e.getSource().equals(butPreview)) { previewBoard();
    public void actionPerformed(ActionEvent e) {        if (e.getSource().equals(butChange) || e.getSource().equals(lisBoardsAvailable)) {            if (lisBoardsAvailable.getSelectedIndex() != -1) {                change((String) lisBoardsAvailable.getSelectedValue());            }        } else if (e.getSource().equals(butUpdate)) {            apply();        } else if (e.getSource().equals(butOkay)) {            send();        } else if (e.getSource().equals(butCancel)) {            setVisible(false);        } else if (e.getSource().equals(butRandomMap)) {            randomMapDialog.setVisible(true);        } else if (e.getSource().equals(chkSelectAll)) {            if (!chkSelectAll.isSelected()) {                lisBoardsSelected.setSelectedIndex(0);                refreshSelectAllCheck();                return;            }            int[] selected = new int[lisBoardsSelected.getModel().getSize()];            for (int i = 0; i < lisBoardsSelected.getModel().getSize(); i++) {                selected[i] = i;            }            lisBoardsSelected.setSelectedIndices(selected);        } else {            try {                int board = Integer.parseInt(e.getActionCommand());                this.lisBoardsSelected.setSelectedIndex(board);            } catch (NumberFormatException n) {            } catch (ArrayIndexOutOfBoundsException a) {            }        }    }