this.frame = frame;
this.client = client;
    public CustomMechDialog(Frame frame, Entity entity, boolean editable) {        super(frame, "Customize pilot stats...", true);                this.entity = entity;        this.frame = frame;                // 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 = 0.0;//        c.gridwidth = GridBagConstraints.REMAINDER;//        gridbag.setConstraints(labInstructions, c);//        add(labInstructions);                    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);                setupButtons();                c.gridwidth = GridBagConstraints.REMAINDER;        c.anchor = GridBagConstraints.CENTER;        gridbag.setConstraints(panButtons, c);        add(panButtons);                fldName.setText(entity.getCrew().getName());        fldGunnery.setText(new Integer(entity.getCrew().getGunnery()).toString());        fldPiloting.setText(new Integer(entity.getCrew().getPiloting()).toString());                if (!editable) {            fldName.setEnabled(false);            fldGunnery.setEnabled(false);            fldPiloting.setEnabled(false);        }                addWindowListener(new WindowAdapter() {	    public void windowClosing(WindowEvent e) { setVisible(false); }	});        pack();        setResizable(false);        setLocation(frame.getLocation().x + frame.getSize().width/2 - getSize().width/2,                    frame.getLocation().y + frame.getSize().height/2 - getSize().height/2);    }