[英]When i run a netbeans project the content in the window doesn't open until i hit maximize
i have only started using Netbeans and i'm pretty inexperience. 我刚开始使用Netbeans而且我很缺乏经验。 When i hit the green play button (to run the project).
当我点击绿色播放按钮(运行项目)。 The window opens, but the content doesn't until i re size it myself.
窗口打开,但内容不会直到我自己调整大小。 This only happens when i have a background image in the projected and the layout is set till null.
只有当我在投影中有背景图像并且布局设置为null时才会发生这种情况。 It opens like this
它打开像这样
你把框架打包到它的内容了吗?
frame.pack();
Make sure that the frame size is not set to 0. In Netbeans this is on the properties tab on the right. 确保框架大小未设置为0.在Netbeans中,这位于右侧的属性选项卡上。 There is minimum size, preferred size and maximum size.
有最小尺寸,首选尺寸和最大尺寸。 Check that none of these have X and Y coordinates of 0
检查其中没有一个X和Y坐标为0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.