This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I'm pretty new to java, I'm trying to detect if an image gets loaded or not, don't know how to do that. I thought by catching the url command it would do it but if you link to an image that doesn't exist it doesn't throw and exception. How can I either detect if url was correct or if icon exists? Thanks
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
7
posted
0
As is explained here, you should first verify that the URL is valid. Additionally/alternatively you can provide an image observer to get more information about the loading process via the ImageIcon.setImageObserver method.