PDA

View Full Version : How to load a picture into a LayoutContainer



brinkman
9 Jul 2008, 2:46 AM
I need to load a picture into a LayoutContainer. I can't get it to work though.
Here is what i did sofar:

LayoutContainer picturePanel = new LayoutContainer();
DataView picture = new DataView();

StringBuffer sb = new StringBuffer();
sb.append("<div>");
sb.append("<img src='LC8-Motor-300breit.jpg' width=350 height=200/>");
sb.append("</div>");

picture.setTemplate(sb.toString());
picturePanel.add(picture);


--> The picturePanel is displayed properly, but for some reason there is no picture in it.
Thanks in advance if someone can help me out on that.

darrellmeyer
9 Jul 2008, 6:59 PM
Just use the GWT Image widget.

brinkman
9 Jul 2008, 11:03 PM
Thank you, it's working fine now.