setSize(770, 320); setLocation(m_clientgui.frame.getLocation().x + m_clientgui.frame.getSize().width/2 - getSize().width/2, m_clientgui.frame.getLocation().y + m_clientgui.frame.getSize().height/2 - getSize().height/2);
setSize(770, 350); setLocation(computeDesiredLocation());
    public MechSelectorDialog(ClientGUI cl, UnitLoadingDialog uld)    {        super(cl.frame, Messages.getString("MechSelectorDialog.title"), true); //$NON-NLS-1$        m_client = cl.getClient();        m_clientgui = cl;        unitLoadingDialog = uld;                for (int x = 0; x < m_saSorts.length; x++) {            m_chSort.addItem(m_saSorts[x]);        }        updatePlayerChoice();                m_pParams.setLayout(new GridLayout(4, 2));        m_pParams.add(m_labelWeightClass);        m_pParams.add(m_chWeightClass);        m_pParams.add(m_labelType);        m_pParams.add(m_chType);        m_pParams.add(m_labelUnitType);        m_pParams.add(m_chUnitType);        m_pParams.add(m_labelSort);        m_pParams.add(m_chSort);                m_pButtons.setLayout(new FlowLayout(FlowLayout.CENTER));        m_pButtons.add(m_bPick);        m_pButtons.add(m_bPickClose);        m_pButtons.add(m_bCancel);        m_pButtons.add(m_labelPlayer);        m_pButtons.add(m_chPlayer);                m_pUpper.setLayout(new BorderLayout());        m_pPreview.setPreferredSize(84, 72);        m_pUpper.add(m_pParams, BorderLayout.WEST);        m_pUpper.add(m_pPreview, BorderLayout.CENTER);        m_pLeft.setLayout(new BorderLayout());        m_pLeft.add(m_pUpper, BorderLayout.NORTH);        m_mechList.setFont(new Font("Monospaced", Font.PLAIN, 12)); //$NON-NLS-1$        m_mechList.addKeyListener(this);        m_pLeft.add(m_mechList, BorderLayout.CENTER);        m_pLeft.add(m_pButtons, BorderLayout.SOUTH);        setLayout(new BorderLayout());        add(m_pLeft, BorderLayout.WEST);        m_mechViewLeft.setFont(new Font("Monospaced", Font.PLAIN, 12)); //$NON-NLS-1$        add(m_mechViewLeft, BorderLayout.CENTER);        m_mechViewRight.setFont(new Font("Monospaced", Font.PLAIN, 12)); //$NON-NLS-1$        add(m_mechViewRight, BorderLayout.EAST);                //clearMechPreview();                m_chWeightClass.addItemListener(this);        m_chType.addItemListener(this);        m_chUnitType.addItemListener(this);        m_chSort.addItemListener(this);        m_mechList.addItemListener(this);        m_bPick.addActionListener(this);        m_bPickClose.addActionListener(this);        m_bCancel.addActionListener(this);        setSize(770, 320);        setLocation(m_clientgui.frame.getLocation().x + m_clientgui.frame.getSize().width/2 - getSize().width/2,                    m_clientgui.frame.getLocation().y + m_clientgui.frame.getSize().height/2 - getSize().height/2);        populateChoices();        addWindowListener(this);    }