swinguser-interfacelayoutnetbeanslook-and-feel

Design GUI with NetBeans: What I design and what I view after run differ


I design GUI with NetBeans 7.0.1 using Swing components and NimbusLookAndFeel. Here is design view: enter image description here

And here is runtime view: enter image description here

Panel without buttons renders correctly... I got this error in other interfaces, and simply change panel size by hand so that it render correctly, but I want to solve this problem using anchors. Where should I look to make this thing work? Thanks.


Solution

  • The components are resizing due to being designed in the default look and feel, but then run under Nimbus. You can preview how they will look by going to the Inspector window, right clicking the JFrame/JDialog/etc, and selecting Preview Design -> Nimbus.

    There may be a way to actually design the form using the Nimbus look and feel, but I am not aware of one.