disableMunitionEditing();
    public CustomMechDialog(Client client, Entity entity, boolean editable) {        super(client.frame, "Customize pilot/mech stats...", true);                this.entity = entity;        this.client = client;        this.options = entity.getCrew().getOptions();        this.editable = editable;                texDesc.setEditable(false);                // layout        GridBagLayout gridbag = new GridBagLayout();        GridBagConstraints c = new GridBagConstraints();        setLayout(gridbag);                    c.fill = GridBagConstraints.VERTICAL;        c.insets = new Insets(5, 5, 5, 5);                    c.weightx = 1.0;    c.weighty = 1.0;        c.gridwidth = 1;        c.anchor = GridBagConstraints.EAST;        gridbag.setConstraints(labName, c);        add(labName);                c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.WEST;        gridbag.setConstraints(fldName, c);        add(fldName);                c.gridwidth = 1;        c.anchor = GridBagConstraints.EAST;        gridbag.setConstraints(labGunnery, c);        add(labGunnery);                c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.WEST;        gridbag.setConstraints(fldGunnery, c);        add(fldGunnery);                c.gridwidth = 1;        c.anchor = GridBagConstraints.EAST;        gridbag.setConstraints(labPiloting, c);        add(labPiloting);                c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.WEST;        gridbag.setConstraints(fldPiloting, c);        add(fldPiloting);                c.gridwidth = 1;        c.anchor = GridBagConstraints.EAST;        gridbag.setConstraints(labDeployment, c);        add(labDeployment);              c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.WEST;        gridbag.setConstraints(choDeployment, c);        add(choDeployment);        refreshDeployment();        if ( client.game.getOptions().booleanOption("pilot_advantages") ) {          scrOptions.add(panOptions);                  c.weightx = 1.0;    c.weighty = 1.0;          c.fill = GridBagConstraints.BOTH;          c.gridwidth = GridBagConstraints.REMAINDER;          gridbag.setConstraints(scrOptions, c);          add(scrOptions);            c.weightx = 1.0;    c.weighty = 0.0;          gridbag.setConstraints(texDesc, c);          add(texDesc);        }                if(entity.hasC3() || entity.hasC3i())        {                  c.gridwidth = 1;          c.anchor = GridBagConstraints.EAST;          gridbag.setConstraints(labC3, c);          add(labC3);                  c.gridwidth = GridBagConstraints.REMAINDER;          c.anchor = GridBagConstraints.WEST;          gridbag.setConstraints(choC3, c);          add(choC3);          refreshC3();        }        // Can't set up munitions on infantry.        if ( !(entity instanceof Infantry) ) {            setupMunitions();            c.anchor = GridBagConstraints.CENTER;            gridbag.setConstraints(panMunitions, c);            add(panMunitions);        }        setupButtons();                c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.CENTER;        gridbag.setConstraints(panButtons, c);        add(panButtons);                fldName.setText(entity.getCrew().getName());        fldName.addActionListener(this);        fldGunnery.setText(new Integer(entity.getCrew().getGunnery()).toString());        fldGunnery.addActionListener(this);        fldPiloting.setText(new Integer(entity.getCrew().getPiloting()).toString());        fldPiloting.addActionListener(this);                if (!editable) {            fldName.setEnabled(false);            fldGunnery.setEnabled(false);            fldPiloting.setEnabled(false);            choC3.setEnabled(false);            choDeployment.setEnabled(false);        }                addWindowListener(new WindowAdapter() {      public void windowClosing(WindowEvent e) { setVisible(false); }  });        pack();        setResizable(false);        setLocation(client.frame.getLocation().x + client.frame.getSize().width/2 - getSize().width/2,                    client.frame.getLocation().y + client.frame.getSize().height/2 - getSize().height/2);    }