It is necessary to display the icon on the Canvas. I use the method:

drawImage(image, x1, y1, w1, h1, x1, y1, w1, h1); 

The picture is set as a resource:

 public interface Bundle extends ClientBundle { public static final Bundle ourInstance = GWT.create(Bundle.class); @ClientBundle.Source(value = {"icon.png"}) public ImageResource icon(); } 

At the moment of drawing, the karinka is 100% loaded (onLoad was called). But still the picture is not drawn, an exception falls: .shell.ModuleSpaceOOPHM.doInvoke ( at ( lower 61) at nativeVoid (Module .java: 289) at ( at MyClassCanvas.drawImage (

    1 answer 1


     Image img = new Image(Bundle.ourInstance.icon()) 


     Image img = new Image(Bundle.ourInstance.icon().getURL)