d.pack();
Insets i = d.getInsets(); d.setSize(500 + i.top + i.bottom, d.getPreferredSize().height);
  public int showOpenDialog(Component parent) throws HeadlessException  {    JDialog d = createDialog(parent);    // FIXME: Remove when we get ancestor property    d.setTitle("Open");    setDialogType(OPEN_DIALOG);    retval = ERROR_OPTION;    d.pack();    d.show();    return retval;  }