gridbag.setConstraints(butPreview, c); panButtons.add(butPreview);
    private void setupButtons() {        butUpdate.addActionListener(this);        butOkay.addActionListener(this);        butCancel.addActionListener(this);        butRandomMap.addActionListener(this);                // layout        GridBagLayout gridbag = new GridBagLayout();        GridBagConstraints c = new GridBagConstraints();        panButtons.setLayout(gridbag);        c.insets = new Insets(5, 5, 0, 0);        c.weightx = 0.0;        c.weighty = 1.0;        c.fill = GridBagConstraints.VERTICAL;        c.ipadx = 20;        c.ipady = 5;        c.gridwidth = 1;        gridbag.setConstraints(butUpdate, c);        panButtons.add(butUpdate);        gridbag.setConstraints(butRandomMap, c);        panButtons.add(butRandomMap);        c.weightx = 1.0;        c.weighty = 1.0;        gridbag.setConstraints(labButtonSpace, c);        panButtons.add(labButtonSpace);        c.weightx = 0.0;        c.weighty = 1.0;        gridbag.setConstraints(butOkay, c);        panButtons.add(butOkay);        c.gridwidth = GridBagConstraints.REMAINDER;        gridbag.setConstraints(butCancel, c);        panButtons.add(butCancel);    }