Combobox problem after removeAllItems() ActionListener does'nt work anymore
Hello,
i'm new to Java-programming aswell as this forum.
I'm developping a WebService, called from a Java-applet on a webpage.
In the applet, i populate a combobox with a list. When a checkbox changes state, the combobox is repopulated with a new list. I use the removeAllItems() statement to clear the combobox, and start adding new elements with the addItem() statement. After the removeAllItems() statement, the ActionListener isn't working anymore. Here's the code of my combobox named "cmbDisciplines".
cmbDisciplines =new JComboBox();
cmbDisciplines.setBounds(new Rectangle(2, 3, 201, 23));
cmbDisciplines.addActionListener(new java.awt.event.ActionListener(){
publicvoid actionPerformed(java.awt.event.ActionEvent e){
int ind3 = 0;
Discipline tempD;
ind3 = cmbDisciplines.getSelectedIndex();
if (ContestFlag ==true){//gaan zien uit welke arraylist
//uit Contestlist
tempD = (Discipline)ContestList.get(ind3);
}else{
//uit Inputlist
tempD = (Discipline)InputList.get(ind3);
}
}
});
if anyone got an idea on what to do, would be a great help, been searching the internet for a few hours

