ImageScaler object in a Table's column HELP!!!!!!!!!!!!

Hi,
I would like to insert an object ImageScaler in a column in a table.
I tried different solutions but do not work.

SOLUTION 1:
public class ImagescalerapplicationApplication extends Application {
private static final long serialVersionUID = -2044472624988550966L;

@Override
public void init() {
Window mainWindow = new Window(“ImageScaler”);
setMainWindow(mainWindow);

Table t=new Table();
t.setWidth(“400px”);
t.setHeight(“400px”);
t.addContainerProperty(“ImagePreview” , ImageScaler.class, null);

VerticalLayout layout = new VerticalLayout();
layout.addComponent(t);
layout.setSizeFull();
layout.setMargin(true);

mainWindow.setContent(layout);

ImageScaler imageScaler = new ImageScaler();
//layout.addComponent(imageScaler);

// set the image and specify it’s size
imageScaler.setImage(new ThemeResource(“…/images/ombrello.jpg”), 300, 300);

// make ImageScaler to take all the available space
//imageScaler.setSizeFull();
t.addItem(new Object{imageScaler}, new Integer(1));
}
}

SOLUTION 2:
@Override
public void init() {
Window mainWindow = new Window(“ImageScaler”);
setMainWindow(mainWindow);

Table t=new Table();
t.setWidth(“300px”);
t.setHeight(“400px”);
t.addContainerProperty(“ImagePreview” , ImageScaler.class, null);

VerticalLayout layout = new VerticalLayout();
layout.addComponent(t);
layout.setSizeFull();
layout.setMargin(true);

mainWindow.setContent(layout);

t.addGeneratedColumn(“ImagePreview”, new ColumnGenerator() {

public Object generateCell(Table source, Object itemId, Object columnId) {
ImageScaler imageScaler = (ImageScaler) itemId;
imageScaler.setImage(new ThemeResource(“…/images/ombrello.jpg”), 300, 300);
// TODO Auto-generated method stub
return imageScaler;
}
});
}
}

other solutions?
PLEASE HELP MEEEEEEEEEEEEEEEEEEEEEEEE!!! THANKS!!!

Answered
here
.

Expecting immediate replies is really not realistic - happens sometimes, but rarely; please, give us at least a working day before chasing up!

Note that a significant proportion of us on the forum are
a) Based in Europe
b) Have jobs, and other commitments

Whilst I am happy to help out - that’s why I’m here - I took 30 mins out of my working day to create a working example of what (I think) you are trying to achieve. “Shouting” for help in this way is actually more likely to make me - and I suspect others - skip your posts.

Anyway : tedious, slightly irritated response over! I hope that the example helps you out, and that you solve your problem.

Cheers,

Charles.