> 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.

You need to prefix the file name with an @ symbol so BXMLSerializer knows it is 
relative to the location of the BXML file.

> 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);

That's because, even though Pivot recognizes SVG files, AWT (the toolkit that 
provides the native host window) doesn't understand them. You'll need to use a 
bitmap format such as PNG.


Reply via email to