public static JComponent addSpring(Container target){
  JComponent spring=new Spring();
  target.add(spring,SLayout.EXPAND_AXIAL);
  return spring;
}

public static JComponent addSpring ( Container target ) { JComponent spring = new Spring ( ) ; target . add ( spring , SLayout . EXPAND_AXIAL ) ; return spring ; }
add a utility component that expands by default , to a container using sboxlayout . adding it rather than just creating the component is a workaround for components not passing information about new subcomponents if the user explicitly specifies the constraints .
