I'm making a card game and loading a load of images for all the cards using this code...

Code:
for (int i=0; i<52; i++)
{
	URL url = this.getClass().getResource("Resources/" + theDeck.getCard(i).getFilename() + ".jpg");
	cardImages[i] = this.getImage(url);
}
getImage returns straight away regardless of wether its finished loading the image or not. I was wondering if anyone knew how to check if the Image has finished loading or anyway of getting it to return once it has loaded.

Thanks alot