Hello Community,
I’m trying to get an image to appear in a panel. I’m new to using Gwt
2.1 and this is my first app. I have a gwt.xml file that inherits gwt
resources. In my entry point onModuleLoad() method I have a
VerticalPanel. I have an interface that extends ClientBundle, a .css
file, I have no idea why the image does not appear in the panel. I’m
running the app in developer mode. Can anyone give me and idea of what
else I need? …I’m stumped. Also when I deploy the app do I need copy
the image to the .war directory? Thanks for your help in advance.
gwt.xml…
<inherits name="com.google.gwt.resources.Resources" />
Package:
com.test.client
The .java file
OnModuleLoad… of entry point
rightsidePanel = new VerticalPanel();
RightSideCB resources = GWT.create(RightSideCB.class);
rightsidePanel.setStyleName(resources.css().rightsidePanel());
RightSideCB Fille
public interface RightSideCB extends ClientBundle {
@Source("myCss.css")
MyCssResource css();
@Source("images/navyShips1.bmp")
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
ImageResource navyShips();
}
MyCssResource File
public interface MyCssResource extends CssResource {
String rightsidePanel();
}
MyCss.css file
@sprite .rightsidePanel {
gwt-image: 'navyShips';
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.