Hi Bob,
You need to make sure that the images directory is on your classpath.
Then you can say:
<ImageView image="foo.png"/>
where the value of the "image" attribute is simply the name of an
image on your classpath, using the same syntax you would pass to
Class#getResourceAsStream().
Greg
On Nov 17, 2009, at 8:53 AM, Bob Santos wrote:
Hi All!
I am trying to replicate the example in the Labels and Image Views
section of the tutorials. I've been looking for something that will
help me in the documentation, unfortunately I found nothing or I'm
just looking at the wrong places.
I just want to ask how do I specify the location of an image in
"main.wtkx" located in the "image" folders if I have this directory
layout.
I <layout.PNG>
And here's the content of "main.wtkx":
<Window title="Hello Pivot" maximized="true"
xmlns:wtkx="http://pivot.apache.org/wtkx"
xmlns="org.apache.pivot.wtk">
<content>
<BoxPane styles="{padding4, verticalAlignment'center'}">
<ImageView image="?" cursor="link" />
<Label text="Add Table" styles="{font'Georgia bold
10'}" />
</BoxPane>
</content>
</Window>
Thanks and Regards,
Bob Santos