简体   繁体   中英

Netbeans 7.0.1 acts weird, couldn't even edit the GUI in design mode

I'm experiencing a very weird problem in Netbeans 7.0.1 while designing a GUI.
At first it was all good, I could design and adjust all the swing components easily and normally. But today, for any reason, it turned to be faulty in which the whole JFrame is extended vertically way way way down (~37,000 in height!), and all the components mixed up messily. However, I couldn't do anything about this, since this happened it doesn't allow me to drag the frame's bottom side upward to minimize the height.
The worst thing is that I couldn't select (click on) some of the components, but some others can be. I don't know how to thoroughly explain this weird thing, just have a look at the Screen shot. 图片

Tell me if you need any further info.
Cheers.

Select the JFrame component from the Navigator panel, and change the height of the JFrame from the properties panel to something like 200. Once you get the size under control, you can use mouse for resizing it to desired size.

This condition may happen if something went wrong while closing the file or if the IDE was terminated abruptly and if the IDE does not get a chance to write all the metadata about the UI properly.

Try to change the size (Height and width) of frame in preferredSize property,and use Panels. Without panels you cannot achieve the arrangement of different objects on a Frame.

在使用上述用户提供的所有技巧对解决此问题的多次尝试失败后感到沮丧之后,[感谢大家,但是它没有用:(],我绝望地重新启动了NetBeans应用程序。会帮助别人遇到同样的问题!

First Note that You can't resize the JFrame if one of the components is the same length as th JFrame. Try resizing that tabbed pane first, then also the list on the left of the tabbed pane (Ongoing Projects).

Next use the inspector to select any component you couldn't select. It might be that another transparent component is covering it, or that it is in a panel and the panel is getting selected instead. Or even the other way round when you can't select a panel because it contains another component. So use the inspector to select components instead.

Finally, if the scroll bar is too long for you to resize easily, you can use the properties window, but note like I said, resize the components in the JFrame first before resizing the JFrame.

Hope this helps

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