I'm writing this blindly (without access to a Kindle), so I can't really judge whether I'm wrong or right. I also don't know what the problem is, but here are some thoughts, in the order of complexity.
1. Make sure that your image is actually present in the .azw2 file where you expect it to be.
2. Avoid "absolute" paths in resources. Whenever I have to deal with resources, I tend to create a subpackage where the resources are, along with a class to load them using their
relative names. Something like this:
Code:
package resources
class Resources {
public static URL load(String name) {
return Resources.class.getResource(name)
}
}
// main code:
// mix.png is looked for in the "logical" package resources.icons
URL url = Resources.load("icons/mix.png")
So in essence, make sure that you're actually getting a URL, not null. Maybe something is smart enough to not throw exceptions on null input (though I doubt it).
3. Finally, it could be that the image is not fully loaded yet. I'm not sure if/when this really happens, but anyway
here's a snippet of code that works on the K5. Look on line 184 for the actual magic. And don't ask me why that works
4. Of course, I assume that your application is otherwise working and displaying correctly (except for the image). Another hint: I always find it useful to have some kind of "status" text where I can programmatically show stuff (like, the URL in your case). You could simply use your existing text area for that.
5. You'd have to refactor your code a bit for the above to work (putting the image loading in start() instead of create()), but that's a VERY good idea anyway. The create() method should do as little logic as possible, because Kindles aren't exactly fast, and you have a maximum of 5000 ms for creation. Make sure that you took a look at the online documentation for AbstractKindlet though (especially the lifecycle diagram!) because start() can be called multiple times, IIRC.
HTH and good luck