lisBoardsAvailable.removeAll(); lisBoardsAvailable.add(Messages.getString("BoardSelectionDialog.Updating"));
((DefaultListModel) lisBoardsAvailable.getModel()).removeAllElements(); ((DefaultListModel) lisBoardsAvailable.getModel()).addElement(Messages.getString("BoardSelectionDialog.Updating"));
    private void apply() {        int boardWidth;        int boardHeight;        int mapWidth;        int mapHeight;                // read map size settings        try {            boardWidth = Integer.parseInt(texBoardWidth.getText());            boardHeight = Integer.parseInt(texBoardHeight.getText());            mapWidth = Integer.parseInt(texMapWidth.getText());            mapHeight = Integer.parseInt(texMapHeight.getText());        } catch (NumberFormatException ex) {            new AlertDialog(client.frame, Messages.getString("BoardSelectionDialog.InvalidMapSize"), Messages.getString("BoardSelectionDialog.InvalidNumberOfmaps")).setVisible(true); //$NON-NLS-1$ //$NON-NLS-2$            return;        }                // check settings        if (boardHeight <= 0 || boardHeight <= 0 || mapWidth <= 0 || mapHeight <= 0) {            new AlertDialog(client.frame, Messages.getString("BoardSelectionDialog.InvalidMapSize"), Messages.getString("BoardSelectionDialog.MapSizeMustBeGreateter0")).setVisible(true); //$NON-NLS-1$ //$NON-NLS-2$            return;        }        butOkay.setEnabled(false);        mapSettings.setBoardSize(boardWidth, boardHeight);        mapSettings.setMapSize(mapWidth, mapHeight);        randomMapDialog.setMapSettings(mapSettings);        refreshMapSize();        refreshMapButtons();        lisBoardsSelected.removeAll();        lisBoardsSelected.add(Messages.getString("BoardSelectionDialog.Updating")); //$NON-NLS-1$        lisBoardsAvailable.removeAll();        lisBoardsAvailable.add(Messages.getString("BoardSelectionDialog.Updating")); //$NON-NLS-1$        client.getClient().sendMapQuery(mapSettings);    }