private static void addToGB(Component comp,Container cont,GridBagLayout gridbag,GridBagConstraints constraints){
  gridbag.setConstraints(comp,constraints);
  cont.add(comp);
}

private static void addToGB ( Component comp , Container cont , GridBagLayout gridbag , GridBagConstraints constraints ) { gridbag . setConstraints ( comp , constraints ) ; cont . add ( comp ) ; }
sets the constraints for the gridbaglayout and adds the component to the given container
