开发者

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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜