I suppose you have hit this (see
here[
^]): "When you specify a filename or URL to an ImageIcon constructor, processing is blocked until after the image data is completely loaded or the data location has proven to be invalid.
If the data location is invalid (but non-null), an ImageIcon is still successfully created; it just has no size and, therefore, paints nothing".