I want to add values into a combobox.
It gives me the following error:
The method add(String) is undefined for the type DefaultComboBoxModel
Any idea?
Code:
defaultComboBoxModel = new DefaultComboBoxModel();
String boardType[] = {"AAA","VBB","sdfa","aaa","e"};
for(int i=0;i<boardType.length;i++){
defaultComboBoxModel.add(boardType[i]);
}
It gives me the following error:
The method add(String) is undefined for the type DefaultComboBoxModel
Any idea?