@Override
    public Dimension preferredLayoutSize(Container parent) {
      return layoutSize(component -> component.getPreferredSize());
    }
@Override
    public Dimension preferredLayoutSize(Container parent)