public void cleanup(ButtonGroup bg){
  if (bg != null) {
    bg.remove(layerName);
  }
  cleanup();
}

public void cleanup ( ButtonGroup bg ) { if ( bg != null ) { bg . remove ( layerName ) ; } cleanup ( ) ; }
same as cleanup , except the layer name toggle button gets removed from the given button group .
