Please help > JComboBox how to change the string [ ]

Hi,

I have declared a combo box without an string [ ] 'cos I need other methods to formula the string 1st. Then I add it into a JPanel.

itemsCombo = new JComboBox();

displayPanel.add(arms2Combo, f);

After I finally got the string, how can I now add the string [ ] into the JComboBox?

I have tried

String [] stuff= {"N1", "N2", "N5"};

ItemsCombo(stuff);

But it doesnt work I also tried to redeclare it

itemsCombo = new JComboBox(stuff);

But it wont work. My program needs to display the Combo Box 1st, and then fill it with string [ ] at the 2nd step. How can I do this?

thank a million

rgds

Rick

[682 byte] By [program_grunta] at [2007-11-26 23:48:32]
# 1
Use a DefaultComboboxModel, setModel(), revalidate() or whatever to make sure changes are actually visualized and the Swing forum for Swing questions next time.
CeciNEstPasUnProgrammeura at 2007-7-11 15:24:14 > top of Java-index,Java Essentials,New To Java...