for(int i = 0; i<total_lines; i+=3) {
cnames[cindex] = currlist.get(i);
cfactor[cindex] = currlist.get(i+1);
csymbol[cindex] = currlist.get(i+2);
//currdata.addElement(cnames[cindex]);
combocurrency.addItem(cnames[cindex]);
cindex++;
}
combocurrency = new JComboBox<String>(cnames);
When the application first starts, the the cnames
array loads string data from default file. But during runtime when i upload a new file, cnames
values' are updated, but the combocurrency
values remains the same in the application! How can i overwrite the combobox values by loading a new file during runtime?