Why doesn't setLocation() move my label?

后端 未结 2 1207
有刺的猬
有刺的猬 2020-12-16 00:02

I have the following code where I try to place a JLabel in a custom location on a JFrame.

public class GUI extends JFrame 
{

    /         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 00:40

    You put the location code under the frame and it will work but if you want it to work for sure put the location code in a run while loop. That's what I did to figure it out and it works.

提交回复
热议问题