Over a million developers have joined DZone.

New Color Chooser in JDK 7

· Java Zone

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

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

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:
java,client-side

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

{{ parent.tldr }}

{{ parent.urlSource.name }}