icon not showing in combobox item

My application is using SQLContainer, and I try to show icon in the combobox item.
From the screen shot, you can see icon shown in front of the selection caption without problems. However, only caption shown in the item without icon.

Here is my code


String[] trends = { "Up", "Down", "Even" };
Resource[] trendIcons = { new ThemeResource("img/Arrow_Up.png"), new ThemeResource("img/Arrow_Down.png"), new ThemeResource("img/Arrow_Even.png") };
ComboBox[] trendFields = { projTrend, safetyTrend, licenseTrend};
String[] trendIds = { "PROJ_TREND", "SAFETY_TREND", "LICEN_TREND" };
for (int i = 0; i < trendFields.length; i++) {
	fieldGroup.bind(trendFields[i]
, trendIds[i]
);
	trendFields[i]
.setIcon(new ThemeResource("img/Arrow_Up.png"));
	
        for (int j = 0; j < trends.length; j++) {
	     Item item = trendFields[i]
.addItem(trends[j]
);
	     trendFields[i]
.setItemCaption(item, trends[j]
);
	     trendFields[i]
.setItemIcon(item, trendIcons[j]
);
        }
}

I also setup the size of icon: 10px


 .v-icon {
     width: 10px;
     height: 10px;
 }

Hope someone can point out what’s part of the code is wrong.

Thanks,
13178.png

I just found the solution from Vaadin book example:
http://demo.vaadin.com/book-examples/book/#component.select.select.icons

So my correct code should be:


trendFields[i]
.addItem(trends[j]
);
trendFields[i]
.setItemCaption(trends[j]
, trends[j]
);
trendFields[i]
.setItemIcon(trends[j]
, trendIcons[j]
);

Now, it looks great as the attached screen shot:
13179.png