@Override
    public Dimension preferredLayoutSize(Container parent) {
      Dimension size1 = myPanel.getPreferredSize();
      Dimension size2 = myOptionsPanel.getPreferredSize();
      return new Dimension(size1.width + size2.width, max(size1.height, size2.height));
    }
@Override
    public Dimension preferredLayoutSize(Container parent)