private static void addToBG(AbstractButton button,Container cont,ButtonGroup bg){
  bg.add(button);
  cont.add(button);
}

private static void addToBG ( AbstractButton button , Container cont , ButtonGroup bg ) { bg . add ( button ) ; cont . add ( button ) ; }
adds the abstractbutton to both the given buttongroup and container
