tags:

views:

31

answers:

1

I am trying to create a java gui using netbeans but the swing panels that look great in the IDE are all over the place after I compile and run the program. what can be causing this?

A: 

NetBeans' Matisse GUI editor is not a WYSIWYG editor, even though it pretends to be one. The fundamental reason is the philosophy of Swing layout managers; there's no way to position the components to absolute positions, because the size of components vary with the platform as well as with the "look and feel".

In practice, it's best to code the layout by hand, using some third-party layout manager. MiGLayout is one of the best and amazingly easy to use.

Joonas Pulakka