显示时只有一小部分窗口可见。我如何展示整个事情?
我有一个充满各种组件的 JFrame。当我运行它时,只出现一小部分。我必须调整窗口大小(用光标拖动边缘)才能显示所有内容。知道如何解决这个问题吗?
I have a JFrame full of various components. When I run it, only a small portion appears. I have to resize the window (drag the edge with cursor) to make everything appear. Any idea how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在使其可见之前,在框架上调用 pack() 方法:
Call the pack() method on your frame before making it visible: