Thread sleep prevents my Swing application from executing

后端 未结 1 750
南笙
南笙 2021-01-27 12:52

What\'s is happening to my application makes sense but I don\'t know how to fix it. Here\'s a brief description of what my application does: A timer window should be display at

相关标签:
1条回答
  • 2021-01-27 13:03

    Does anyone know how to make my application execute while having a thread.sleep()

    Don't use a Thread.sleep().

    Instead use a Swing Timer. You set the Timer to fire every second so you components can be updated.

    0 讨论(0)
提交回复
热议问题