简体   繁体   English

当我运行netbeans项目时,窗口中的内容不会打开,直到我达到最大化

[英]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 它打开像这样

1

你把框架打包到它的内容了吗?

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.

相关问题 当我尝试在NetBeans中打开我的项目时,它无法打开 - When I try to open my project in NetBeans it doesn't open 当我点击运行按钮时,我的 JFrame 不会出现,尽管 NetBeans 说它正在运行 - My JFrame won't show up when I hit Run button althought NetBeans said it is running 当我在 NetBeans 中点击运行时,我的 GUI 不会显示 - My GUI will not display when I hit run in NetBeans 我在NetBeans平台上开发插件时如何调用打开的项目窗口? - How it is possible to call open project window when i develop plugin in netbeans platform? 安装jre 7后,netbeans项目无法运行 - netbeans project doesn't run when jre 7 installed 当我尝试运行我的程序时,视图无法打开? - View Doesn't Open When I Try To Run My Program? 为什么我打开 Eclipse 或 NEtbeans 时 javaw.exe 不启动? - Why doesn't the javaw.exe start when i open Eclipse or NEtbeans? 当我尝试在 .netbeans 中运行 maven 项目时出现错误 - I have an error when I try to run a maven project in netbeans 运行项目时,我的应用程序未在模拟器上显示 - My app doesn't show on emulator, when I run the project 当我在 netbeans 之外运行它时,我的可执行 jar 无法打开资源文件 - My executable jar can't open resource files when I run it outside of netbeans
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM