@Override
  public Dimension maximumLayoutSize(Container container) {
    Component component = getComponent(container);
    return getSize(container, component != null ? component.getMaximumSize() : new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
  }
@Override
  public Dimension maximumLayoutSize(Container container)