How to create a delay in Swing

后端 未结 4 758
长情又很酷
长情又很酷 2020-11-30 14:49

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 done t

4条回答
  •  醉酒成梦
    2020-11-30 15:47

    I think that in this tutorial is clear how to use Timers in order to achieve what you want, without having to deal with Threads.

提交回复
热议问题