Quit multiposting questions. You've already been given an answer.
Show us the code where you manually add 2 or 3 images to a JFrame.
Once, you've mastered that code you look at the common part of the code that creates and adds the image to the frame and make a loop out of it.
Master the basics first and then make the code more general.