items.getSelectedItem());
(String) items.getSelectedValue());
    public void setVisible(boolean visible) {        // Make sure the "keep" button is set correctly.        setPrevSelection((String) categories.getSelectedItem(),                items.getSelectedItem());        // Make sure the "select" button is set correctly.        itemStateChanged(new ItemEvent(items, 0, items.getSelectedItem(), ItemEvent.SELECTED));        // Now show the dialog.        super.setVisible(visible);    }