Search this site on this question and you'll see why Thread.sleep(...)
is not good when called on the Swing event thread. You'll also see that you should be using a Swing Timer instead.
For example, please have a look at my code in my answer here.
In your situation, assuming an array of ImageIcons, you could try something like:
new Timer(timerDelay, new ActionListener() {
private int iconIndex = 0;
public void actionPerformed(ActionEvent evt) {
if (iconIndex < iconArray.length) {
label.setIcon(iconArray[iconIndex]);
iconIndex++;
} else {
((Timer)evt.getSource()).stop(); // stop the timer
}
}
}).start();
For the gory details, please check out the Swing Timer Tutorial.
Edit
You state in comment:
I don't have an array of ImageIcons, I have 13 images and a button, I want to make a external function (Out of the Button event) that makes appear 13 images in it every one second, superposing them one in top of the other (in the same place).
No problem -- then make an array of Icon or ArrayList<Icon>
and stuff you ImageIcons in there. Regardless, my code above was not meant for cutting and pasting but to give you a general idea of the form of a solution, since the ideas can be extended to your problem. You will now need to take this idea as well as what you can glean from the Swing Timer tutorial (again the link can be found here), and try to write code for your own solution. Also please search this site on the subject of Swing Timer and animation because this kind of question gets asked a lot. But note when searching, don't look for exact duplicates of your question, since that usually doesn't exist, but rather questions that involve similar concepts, and then borrow the concepts showed in their solutions.
Best of luck in your endeavor!