Delay « Thread « Java Swing Q&A





1. How to use a delay in a swing application    stackoverflow.com

I am building a swing application. At some point, I have to start an "animation":

...
jpanel1.setBackground(Color.Black);

Delay(milli)   

jpanel1.setBackground(Color.White);
...
and so on. The gui itself and all the logic behind it work.It is just ...

2. Is it possible to delay multiple parts of a thread with a gui?    stackoverflow.com

Is it possible to delay multiple parts of a thread with a gui? Like setting a JLabel

3. How to create a delay in Swing    stackoverflow.com

I made a blackjack game, and I want the AI player to pause between taking cards. I tried simply using Thread.sleep(x), but that makes it freeze until the AI player is ...