Reputation: 11
I want to know how to view a picture in a HTML?
Example:
HTML htmlS = new HTML(picture resource+"[加载中...]");
how can I write "picture resource" GWT code?
Upvotes: 1
Views: 507
Reputation: 7634
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>)
Upvotes: 3