开发者

Odd behaviour from Java IDE (NetBeans)

开发者 https://www.devze.com 2023-02-07 01:30 出处:网络
I\'m using Java and NetBeans to create an application and I seem to be getting some varying results when开发者_StackOverflow中文版 it comes to making and changing the GUI using the editor.

I'm using Java and NetBeans to create an application and I seem to be getting some varying results when开发者_StackOverflow中文版 it comes to making and changing the GUI using the editor.

My design in the editor looks like this:

Odd behaviour from Java IDE (NetBeans)

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

Odd behaviour from Java IDE (NetBeans)

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:

Odd behaviour from Java IDE (NetBeans)

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消