public void componentRemoved(ContainerEvent e){
  Layer childLayer=(Layer)e.getChild();
  removeProjectionListener(childLayer);
  removedLayers.addElement(childLayer);
  changeLayers(e);
}

public void componentRemoved ( ContainerEvent e ) { Layer childLayer = ( Layer ) e . getChild ( ) ; removeProjectionListener ( childLayer ) ; removedLayers . addElement ( childLayer ) ; changeLayers ( e ) ; }
containerlistener interface method . should not be called directly . part of the containerlistener interface , and it ' s here to make the mapbean a good container citizen . layers that are removed are added to a list , which is cleared when the projection changes . if they are added to the mapbean again before the projection changes , they are taken off the list , added back to the mapbean , and are simply repainted . this prevents layers from doing unnecessary work if they are toggled on and off without projection changes .
