View Full Version : How do I add images to my GXT project
21 May 2012, 9:24 AM
I've found some stuff here and there, but none of it seems to be working properly. It appears that I should be creating an interface that extends ClientBundle, but it simply doesn't show up when I add the ImageBundle.
Can someone help me with this, please?
22 May 2012, 1:25 AM
public interface Icons extends ClientBundle
Icons INSTANCE = GWT.create(Icons.class);
From your class, use the Icons Interface as follows:
ContentPanel cp = new ContentPanel();
final Image mySampleImage = new Image(Icons.INSTANCE.getMySampleImage());
Hope this helps you... ;)
Powered by vBulletin® Version 4.1.5 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.