New Color Chooser in JDK 7

DZone 's Guide to

New Color Chooser in JDK 7

· Java Zone ·
Free Resource

Many changes in Swing will appear in JDK 7 including a new date chooser. I've recently noticed that the JColorChooser has also improved in JDK 7 adding new ways to select the color and adding support for transparency.
I'm quite please with it as for my photo editor Decoration I added a Transparency tab to the standard color chooser.

In Java 6 you have 3 tabs: Swatches, HSB (Hue, Saturation, Brightness) and RGB (Red, Green, Blue).

In Java 7 you have 5 tabs: Swatches, HSV (Hue, Saturation, Value), HSL (Hue, Saturation, Lightness), RGB (Red, Green, Blue) and CMYK (Cyan, Magenta, Yellow, blacK).
The HSV and HSL tabs have a transparency slider (from 0 to 100).
The RGB and CMYK tabs have an alpha slider (from 0 to 255).
Note also that the size of the JColorChooser window has increased.

And here are the screenshots:
The new color chooser of Java 7
The new color chooser of Java 7

From http://www.jroller.com/agoubard

client-side, java

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}