All pastes #287760 Raw Edit

Something

public text v1 · immutable
#287760 ·published 2006-12-21 19:19 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]);
        }