Showing a picture from Theme folder

hello

I have big problem and can not get past it!

I want to display picture from my theme folder.



		Embedded slika = new Embedded("Slika", new ThemeResource("pics/tna0.jpg"));	
			slika.setType(Embedded.TYPE_IMAGE);
	
			vLayout.addComponent(slika);

And only thing that shows up is name of “Slika” no picture!

This is the message I get:


INFO: Requested resource [VAADIN/themes/runo/pics/tna0.jpg]
 not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

My picture is save in folder: “WebContent/VAADIN/themes/runo/pics/tna0.jpg”

Can you please help me

First of all you need to declare your own theme to add new images. Otherwise Vaadin doesn’t know where to look for the image.
This isn’t needed if you use Vaadin’s built in theme resources ( http://demo.vaadin.com/sampler#ImageEmbed ).

To me it looks like you are using the default runo theme.
Creating your own theme can be done like this:
http://vaadin.com/forum/-/message_boards/message/47990

Then you should add a map pics to your theme directory to give you some idea:

src
|
webapp
|
VAADIN
|
themes
|
(“themename”)
|
pics
|-tna0.jpg

Then it should work.