For some reason, I need to have a class extending composite with only an image inside. When I use it I can never get the image to display + other strange behaviours. So I simplified the code and it turns out even the code below doesn't display anything. Is it possible to composite with an Image?
public class TestImage extends Composite {
public TestImage(){
initWidget(new Image());
}
public void setResource(ImageResource resource) {
((Image) getWidget()).setResource(resource);
}
}
image = new TestImage();
image.setResource(xxx);
panel.add(image);
The image is there but no resource is being displayed.
I am sure it is somethign pretty trivial that I have overlooked.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment