[quote]MediaTracker requires a Component; it is, however, legal to call its constructor using null as the Component.
[/quote]
is it?
From what I can see in the src, if you construct a MediaTracker with a null, it will throw a NullPointerException the first time you try and make it load any of the images youve added to it.
these are the only mentions of the passed in Component that I can find (there are no checks for a null parameter)
Component target;
..
..
public MediaTracker(Component comp) {
target = comp;
}
..
..
..
..
int getStatus(boolean doLoad, boolean doVerify) {
if (doVerify) {
int flags = tracker.target.checkImage(image, width, height, null);
..
..
..
void startLoad() {
if (tracker.target.prepareImage(image, width, height, this)) {
setStatus(COMPLETE);
}
As for the issue of having an image loading library, that has no direct association with the AWT architecture.
You could use toolkit.createImage(), toolkit.prepareImage, and the ImageObserver interface to manage the loading of the images yourself.
However, I must point out, the internal representation of an loaded image can be affected by where you intend to render the image.
For instance, on a multi-display system, the internal representation for the 2 [or more] display devices maybe different.
This may mean images loaded for the default device will not render correctly onto the other devices (or will render far slower, because of pixel format conversion)