add an ancestor listener for saving env prefs when the component is removed . concode_field_sep boolean initInEvent concode_elem_sep JComponent component concode_elem_sep ValueSetManager valueSet concode_elem_sep GuiShell shell concode_elem_sep RuleInfoBinding binding concode_elem_sep GuiEnvironment env concode_elem_sep Object object concode_field_sep Object getObject concode_elem_sep void setTopLevelSupport concode_elem_sep GuiTopLevel initComponent concode_elem_sep void ancestorAdded concode_elem_sep void setDefaultValueSetInEventLater concode_elem_sep GuiComponentPreferences.WindowPreferences getWindowPrefs concode_elem_sep GuiComponentPreferences.WindowPreferences getWindowPrefs concode_elem_sep void setComponent concode_elem_sep ValueSetManager getValueSet concode_elem_sep JComponent getCreatedComponent concode_elem_sep void invokeAndWait concode_elem_sep void saveEnv concode_elem_sep boolean isInitInEvent concode_elem_sep RuleInfoBinding getBinding concode_elem_sep GuiTopLevel initBindingAndEnvForObject concode_elem_sep void loadEnv concode_elem_sep void ancestorMoved concode_elem_sep void ancestorRemoved concode_elem_sep JComponent getComponent concode_elem_sep String getTypeName concode_elem_sep JMenu getValueSetMenu concode_elem_sep void updateDefaultValueSetInEventLater concode_elem_sep GuiTopLevel initBindingForObject concode_elem_sep GuiEnvironment getEnv
void function ( ) { getCreatedComponent ( ) . addAncestorListener ( new SaveByAncestorRemoved ( ) ) ; }