简体   繁体   中英

Odd behaviour from Java IDE (NetBeans)

I'm using Java and NetBeans to create an application and I seem to be getting some varying results when it comes to making and changing the GUI using the editor.

My design in the editor looks like this:

编辑器视图

When I click on the icon to give me a demonstration of what it would actually look like I see this:

演示视图

Notice that the panel to the right of the GUI has moved down and pushed the text box down as a result.

Now when I come to run the application itself I see this:

正在运行的应用程序

I may be too used to the way in which the Visual Studio IDE works in the fact that everything generally stays where you put it, am I missing some sort of hidden trick or property that is throwing everything off?

Thanks for your time.

Edit:

Code for the components - http://pastebin.com/FHF2fBEw

I had this kind of problems before, not always the visual designer ( Matisse in this case) gives you the same result at different window resolutions. After fighting with several issues like the one you are having now, I decided to use JGoodies Forms .

I would suggest you to use it if you want to have control over your GUIs without a lot of code.

What kind of layout are you using? I suggest a java.awt.GridBag layout for what you're doing.

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