setLocation(getParent().getLocation().x + getParent().getSize().width/2 - getSize().width/2, getParent().getLocation().y + getParent().getSize().height/2 - getSize().height/2);
setProperSize(); setProperLocation();
    public RandomMapDialog(Frame parent, IMapSettingsObserver bsd, MapSettings mapSettings) {        super(parent, Messages.getString("RandomMapDialog.title"), true); //$NON-NLS-1$        this.mapSettings = mapSettings;        this.frame = parent;        this.bsd = bsd;        setResizable(true);                createComponents();        loadValues();        setLayout(new BorderLayout());        setupOptions();        add(scrAll, BorderLayout.CENTER);        setupButtons();        add(panButtons, BorderLayout.SOUTH);        validate();        pack();                butOK.requestFocus();        setLocation(getParent().getLocation().x + getParent().getSize().width/2 - getSize().width/2,                    getParent().getLocation().y + getParent().getSize().height/2 - getSize().height/2);        initiated = true;    }