panel.removePropertyChangeListener(this); removePropertyChangeListener(panel);
if (panel != null) { panel.setControls(null); panel.removePropertyChangeListener(this); removePropertyChangeListener(panel);
    public void removeLayersPanel(LayersPanel panel) {        panel.removePropertyChangeListener(this);        removePropertyChangeListener(panel);        if (embedded) {            if (configuration.equalsIgnoreCase(NORTH_SOUTH_CONFIG)) {                panel.remove(up);                panel.remove(down);            } else {                panel.remove(this);            }        }    }