public static void addGlue(JComponent b,int layout){
  b.add(getAxis(b,layout) == BoxLayout.X_AXIS ? Box.createHorizontalGlue() : Box.createVerticalGlue());
}

public static void addGlue ( JComponent b , int layout ) { b . add ( getAxis ( b , layout ) == BoxLayout . X_AXIS ? Box . createHorizontalGlue ( ) : Box . createVerticalGlue ( ) ) ; }
add a glue , or variable spacing , to a ui component
