JPanel setLocation

前端 未结 2 1784
眼角桃花
眼角桃花 2020-12-12 05:23

Where it says: usePanel.setLocation(800,usePanel.getY()); it doesn\'t set the location it just starts in the middle, but inside the for loop where it gradually changes the p

2条回答
  •  旧时难觅i
    2020-12-12 05:55

    Why you think it is not working? Probably you cannot just notice it. After your first setPosition() add following code:

    Thread.sleep(3000);
    

    Then you will notice it.

提交回复
热议问题