IndexedContainer item with icon

I’m trying to add icon in a tables row :

indexedcontainer.addContainerProperty("ICON", Resource.class,null);

Item item=indexedcontainer.addItem(resultset.getInt("id"));
item.getItemProperty("ICON").setValue(new ThemeResource("img/24-em-up.png"));

The Table :

table.addContainerProperty("ICON", Resource.class,null);
table.setContainerDataSource(indexedcontainer);

Someone knows what i’m doing wrong???

Resources are just datasources for components, and not UI elements themselves. To show a Resource you need to wrap it in a Component, and generally Embedded is the best choice. So:

indexedcontainer.addContainerProperty("ICON", Component.class,null);
..
item.getItemProperty("ICON").setValue(new Embedded("",
    new ThemeResource("img/24-em-up.png")));
..
table.addContainerProperty("ICON", Component.class,null);