view.updateMenuItems();
    public void setSelectedBrowser(Browser browser)    {        switch (model.getState()) {            case DISCARDED:            case SAVE:                throw new IllegalStateException(                    "This method cannot be invoked in the DISCARDED or SAVE " +                    "state.");        }        Browser oldBrowser = model.getSelectedBrowser();        if (oldBrowser == null || !oldBrowser.equals(browser)) {            model.setSelectedBrowser(browser);            if (browser != null) browser.activate();            removeEditor();            firePropertyChange(SELECTED_BROWSER_PROPERTY, oldBrowser, browser);        }    }