Hi,
I extended my class from org.apache.pivot.wtk.Window, and use bxml to design
the screen. I noticed that the window icon displayed by the operating system
for the window is an ugly Java icon (in a bad resolution!). I tried 2 things
to set my own icon, without success... Can someone point me in the right
direction?
First try: In the bxml file, on my root element (so basically on Window) i
added the attribute icon="logo.svg". This results in
'java.lang.IllegalArgumentException: iconURL is null' during initialization.
Second try: In the class I extended from Window, I added the following in
the initialize method. After that, I no longer receive errors, but the icon
isn't changing either.
URL url = ClassLoader.getSystemClassLoader().getResource("logo.svg");
this.setIcon(url);
Note, the file "logo.svg" is on the top level of the classpath, and I added
the Salamander library for the SVG processing.
Thanks,
Wim