Swing Timer stops calling actionPerformed() while the mouse is moving inside a JFrame

前端 未结 1 1982
花落未央
花落未央 2021-01-25 03:25

If I move my mouse inside a javax.swing.JFrame, the javax.swing.Timer stops calling the actionPerformed() method until the mouse stops mov

相关标签:
1条回答
  • 2021-01-25 03:33

    I solved the problem as I reduced the polling-rate of my mouse from 1000Hz to 500Hz. Now everything works perfect. I think the problem was that the UI-Thread was overextended handling the 1000 polls per second so it was to busy to handle the Timer.

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