I have to resize my JFrame for the contents to show up. How can i fix that?

后端 未结 6 1395
孤城傲影
孤城傲影 2021-01-18 07:47

When I run my gui, I have to resize the window for everything to show up. Does someone know what the problem is?

6条回答
  •  醉话见心
    2021-01-18 08:47

    don't need to add pack() method.

    Just add the setSize(int, int) on the end of everything, then it will work well.

    and setVisible(true) on next to setSize.

提交回复
热议问题