public static void addGlue(JComponent b,boolean horiz){
  b.add(horiz ? Box.createHorizontalGlue() : Box.createVerticalGlue());
}

public static void addGlue ( JComponent b , boolean horiz ) { b . add ( horiz ? Box . createHorizontalGlue ( ) : Box . createVerticalGlue ( ) ) ; }
add a glue , or variable spacing , to a ui component
