@Override
      public Dimension getPreferredSize() {
        Dimension d = super.getSize();
        d.width = d.height = Math.max(d.width, d.height);
        return d;
      }
@Override
      public Dimension getPreferredSize()