简体   繁体   中英

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. 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. 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. There is minimum size, preferred size and maximum size. Check that none of these have X and Y coordinates of 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM