Originally Posted by iHank
The problem was not the URL by itself. The problem with ImageIcon is that it uses the machinery in java.awt.Toolkit to load the image. And Toolkit uses a "caching" strategy: for the same url/filename you get the same Image object. The second time you get the same Image object, even if the file content/url stream is physically changed. By the way, this can be solved .... with the flush() of Image.
Keep also in mind that ImageIO loads the image synchronously, while Toolkit/ImageIcon loads a
synchronously. A synchronous loading can have a bad impact on your app (especially if you do this in the context of the EDT, Event Dispatch Thread).