public void removeLayer(int index){
  List<Layer> currentLayers=getLayerList();
  try {
    currentLayers.remove(index);
    setLayerList(currentLayers);
  }
 catch (  IndexOutOfBoundsException ioobe) {
  }
}

public void removeLayer ( int index ) { List < Layer > currentLayers = getLayerList ( ) ; try { currentLayers . remove ( index ) ; setLayerList ( currentLayers ) ; } catch ( IndexOutOfBoundsException ioobe ) { } }
remove a layer from the list of potentials .
