All pastes #287763 Raw Edit

Stuff

public text v1 · immutable
#287763 ·published 2006-12-21 19:21 UTC
rendered paste body
//Purpose of class is to let the user choose how many Combo boxes to create
//All the combo boxes have the same values (a, b, c and d)

public String[] comboBoxValues = { "a", "b", "c", "d" };
public JComboBox comboBox[];
public int size; //number of combo boxes to create

...

comboBox = new JComboBox[size];

 for (int i = 0; i<size; i++) {             
            centerPanel = new JPanel();
            centerPanel.setLayout(new FlowLayout());

            centerPanel.add(comboBox[i]);
            contentPane.add(centerPanel);
        }