src/main/java/org/jwellman/swing/Utilities.java
public static JComponent allowMaxWidth(JComponent c) {
        Dimension d = c.getPreferredSize(); 
        d.width = Short.MAX_VALUE;
        c.setMaximumSize(d);
        return c;
    }
/**
     * Often we want components to span the entire width of the container;
     * this mimics behavior when laying out HTML documents and is usually
     * more natural and desired than the way most Swing components are 
     * natively sized.
     * 
     * A canonical example of this is putting a JLabel in a vertical BoxLayout.
     * 
     * @param c
     * @return
     */
Often we want components to span the entire width of the container;
this mimics behavior when laying out HTML documents and is usually
more natural and desired than the way most Swing components are
natively sized.

A canonical example of this is putting a JLabel in a vertical BoxLayout.

@param c
@return
Often we want components to span the entire width of the container ; this mimics behavior when laying out HTML documents and is usually more natural and desired than the way most Swing components are natively sized . A canonical example of this is putting a JLabel in a vertical BoxLayout . @param c @return
public static JComponent allowMaxWidth(JComponent c) {
        Dimension d = c.getPreferredSize(); 
        d.width = Short.MAX_VALUE;
        c.setMaximumSize(d);
        return c;
    }
public static JComponent allowMaxWidth ( JComponent c ) { Dimension d = c . getPreferredSize ( ) ; d . width = Short . MAX_VALUE ; c . setMaximumSize ( d ) ; return c ; }
Often we want components to span the entire width of the container;
 this mimics behavior when laying out HTML documents and is usually
 more natural and desired than the way most Swing components are
 natively sized.
Often we want components to span the entire width of the container ; this mimics behavior when laying out HTML documents and is usually more natural and desired than the way most Swing components are natively sized .