How can I set the GUI builder to generate javax.swing.GroupLayout instead of org.jdesktop.layout.GroupLayout?

The javax.swing.GroupLayout manager was introduced in Java 6. You can use the same features with Java 5 if you use the Swing Layout Extensions library (aka swing-layout). The GUI builder can be set to either use the library, or the Java 6 code. By default it is set based on the target platform of the project.

How to change existing forms

If you need to change the way GroupLayout is generated for an existing GUI form, follow these steps:

  • Open the form.
  • Select the root node of the opened form in the Inspector (next to Navigator).
  • Show its Properties (Window | Properties, or from context menu).
  • Set the property called Layout Generation Style.

Note: The global setting in Options only determines how newly created forms will be set, does not affect existing forms.

For more details about the use in NetBeans see the other questions, for example:

  Applies to: NetBeans 6.x
  Platforms: All
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo