how to move jlabel every second?

后端 未结 3 712
耶瑟儿~
耶瑟儿~ 2021-01-16 03:10

i try to move it to the right(x++) every seconds

i try to move it with thread..

  1. how to do it? (and can see it move every second)
  2. there are an
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-16 04:05

    Here is an Swing example of a simple puzzle game.

    Java Swing Shuffle Game

    When you press Pause button the title will get animate until you release the pause. Similarly you can use it for JLabel. Source code is also attached.

    Hope that can help you much.

提交回复
热议问题