Swing Enhancements in Java SE 7

The following topics are covered:

JLayer Class

The JLayer class is a flexible and powerful decorator for Swing components. It enables you to draw on components and respond to component events without modifying the underlying component directly. For more information, read How to Decorate Components with JLayer in the Java Tutorial.

Nimbus Look & Feel

The Nimbus Look & Feel (L&F) has moved from com.sun.java.swing to a standard API namespace, javax.swing; see the javax.swing.plaf.nimbus package for more information. Although it is not the default L&F, you can easily use it. Consult the Nimbus Look and Feel section in the Java Tutorial for more information and examples of three simple methods for using Nimbus in your applications.

Heavyweight and Lightweight Components

Historically, mixing heavyweight (AWT) and lightweight (Swing) components in the same container has been problematic. However, mixing heavyweight and lightweight components is easy to accomplish in Java SE 7. The Mixing Heavyweight and Lightweight Components article shows you how.

Shaped and Translucent Windows

The Java SE 7 release supports windows with transparency and non-rectangular shapes. See How to Create Translucent and Shaped Windows, part of the Java Tutorial.

Hue-Saturation-Luminance (HSL) Color Selection in JColorChooser Class

An HSV tab has been added to the JColorChooser class, which allows users to select colors using the Hue-Saturation-Luminance (HSL) color model.

In addition, the following technologies feature related enhancements:


Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.