This is a pretty big question, and in order to make it manageable I'm going to assume that you know how to draw an image once you have an Image object. Instead, I'm going to focus on managing a group of Images to represent a deck of
cards.
So, let's say you have a deck of 52
cards. Let's further assume that you have 52 different images, one for each card. Finally, we'll say that the images are in 52 GIF files, one for each image, and that you have those 52 names in an array call imageFileNames. Load the images from the files:
Okay, now you want to display the appropriate image. You would need to generate a random number between 0 and 51 to select one of those cards, right? So let's say your generated value between 0 and 51 is stored in a variable called "card". The image for that card would be in cardImages[card]. Use this in the appropriate paint() method.
Hope this helps.
Joe