开发者

View a picture in GWT HTML

开发者 https://www.devze.com 2023-01-04 16:25 出处:网络
I want to know how to view a picture in a HTML? Example: HTML htmlS = new HTML(picture resource+\"开发者_运维技巧[加载中...]\");

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

精彩评论

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