calculateResize
public static Dimension calculateResize(Container contentPane,
                        Component left,
                        Component right,
                        Component top,
                        Component bottom,
                        Dimension borders,
                        Dimension fixedSize)
Calculates the size of a component depending on other components.
 This resizes UI-components. It will fail if a components location depends on another components size.
 You can set a fixed size for an axis and how much border space should be left.
- Parameters:
 contentPane - The contentPane that holds the components.left - The left component.right - The right component.top - The top component.bottom - The bottom component.borders - The space there is between the components (multiply by 2).fixedSize - If there is a fixedSize set for an axis, it won't stretch. 
- Returns:
 - Returns the calculated size for the element.