Revision as of 16:33, 12 November 2009 by Jstola (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

What is the Swing Layout Extensions library (org.jdesktop.layout) and do I need it?

The Swing Layout Extensions library (aka swing-layout) is a set of classes extending the layout capabilities of Swing. The main features are: aligning on baseline, platform independent spacing (LayoutStyle), new layout manager (GroupLayout), and more. These classes are necessary for the GUI Builder to work in the "free design" mode. Also the generated GUI code needs the classes for execution.

Note: Since Java 6 all these features are part of standard JDK/JRE. So you only need the Swing Layout Extensions library if you need your application running on Java 5. NetBeans allows you to choose whether to use the library or standard Java 6 code for your GUI forms, see FaqFormLayoutGenerationStyle.

The library is bundled with NetBeans and is automatically added to your project, so you mostly don't need to care about it. You can find it in the Library Manager in the IDE; physically it is located under the installation directory in platform<version>/modules/ext/swing-layout-version.jar.

The library itself is developed as an open source project on java.net (one of the Swing Labs projects). See the project home page.

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

  Applies to: NetBeans 5.0, 5.5, 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