How to populare a Combobox

Hi all,

I need to populate a ComboBox with some Items.
An Item has an ID and a VALUE.
What’s the right way to populate a ComboBox…I am just a bit confused.


Hey Stefano,

Did you take a look at
? For the most basic use, adding items can be done with

ComboBox cb = new ComboBox("Something");

for(int i = 0; i < 100; i++) {
  cb.addItem("Item #" + i);

Also, if you want the caption to be different from the item ID, you can use