Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

New Color Chooser in JDK 7

DZone's Guide to

New Color Chooser in JDK 7

· Java Zone
Free Resource

Make it happen: rapid app development on Kubernetes as a managed service.

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

Tutorial: WordPress as distributed microservices on Kubernetes.

Topics:
java ,client-side

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}