Blinking in JFrame Java

前端 未结 3 779
南笙
南笙 2020-12-06 23:54

Hello guys I am doing a thread to update a ball over JFrame so I repaint the screen... and then paint the ball update its position .. and then draw the screen again ... draw

3条回答
  •  一整个雨季
    2020-12-07 00:28

    If you access GUI components outside the EDT (Event Dispatch Thread) then you might encounter strange problems, Contrary if you perform long running tasks in the EDT then also you will get problems.

    Check this post for more info on GUI Threading in Java

提交回复
热议问题