tags:

views:

44

answers:

2

hell,i want to know how to view a picture in a HTML? EXAMPLE:

HTML htmlS = new HTML(picture resource+"[加载中...]");

how to write "picture resource" gwt code?

i'm a new gwt programmer.come from china. thank you!

+2  A: 

Create an object of com.google.gwt.user.client.ui.Image and make a call to setUrl() with the URL of the image resource.

image.setUrl(GWT.getModuleBaseURL() + <relative path to image resource>)
Ashwin Prabhu
This is the right way to do it.If for some reason it has to be HTML, use "<img src='path'>";
dmazzoni
Thank you so much!
Oliver
A: 

You can use the img tag in HTML widget..

iftee