[RSS]

What is the Swing Layout Extensions library (swing-layout) and why 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 the layout features are part of standard JDK. So you only need the Swing Layout Extensions library if you want your application running on Java 5. NetBeans 5.5 (not 5.0) allows you to choose whether to use the library or standard Java 6 code. (The root node of an opened form in Inspector has a property called Layout Generation Style.)

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 platform8/modules/ext/swing-layout-1.0.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