View a picture in GWT HTML
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?
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>)
You can use the img tag in HTML widget..
精彩评论