When you add a widget to a LayoutPanel, it takes up all the space unless you 
specify it's position (see below). Also, you can add only one widget to the 
RootLayoutPage. You can't add an image directly to it, unless your entire app 
consists of this image and nothing else.

So, try this:

img.setSize("12px", "12px");
LayoutPanel panel = new LayoutPanel();
panel.add(img);
panel.setWidgetTopHeight(img, 100, Unit.PX, 12, Unit.PX);
panel.setWidgetLeftWidth(img, 100, Unit.PX, 12, Unit.PX);
RootLayoutPanel.get().add(panel);

Alternatively, you can use a FlowPanel and set CSS style on the image, as you 
tried, and then add this FlowPanel to the root.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Tg85RTSenRkJ.
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.

Reply via email to