List of usage examples for java.awt Component setMaximumSize
public void setMaximumSize(Dimension maximumSize)
From source file:org.openmicroscopy.shoola.util.ui.UIUtilities.java
/** * Sets the preferred size, minimum and maximum size of the specified * component.//from ww w .j a v a 2 s . co m * * @param component The component to handle. * @param dim The dimension to set. */ public static void setDefaultSize(Component component, Dimension dim) { if (component == null) return; if (dim == null) dim = new Dimension(5, 5); component.setPreferredSize(dim); component.setMaximumSize(dim); component.setMinimumSize(dim); }