Threaded View

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Vote Rating
    newtogxt3 is on a distinguished road


    Default Answered: How to create ImageResource?

    It's not clear to me how to create/use ImageResource. I'm trying to create a button and give it an icon like this:

    TextButton button = new TextButton();
    button.setIcon( anImageResource ) -- and this is what I've no idea how to do.

    Please help. Thanks.

  2. Here's how we do it:

    public interface Images extends ClientBundle {

    public Images INSTANCE = GWT.create(Images.class);

    ImageResource foo();


    Note that the PNG would need to be in the same package directory as the class.