Color.white vs. Color.WHITE

N

Niels Dybdahl

Way back some AWT colors was predefined as Color.white etc.
Then SUN realized this apparent naming style violation and
added Color.WHITE etc.

As a client application developer I must now choose between
the non-standard (and possibly soon-to-be-deprecated)
Color.white and the not-backwards-compatible Color.WHITE.

I've ended up with new Color (255, 255, 255) instead.

Just stick with Color.white. I doubt it will go away.

Niels Dybdahl
 
J

Jacob

Way back some AWT colors was predefined as Color.white etc.

Then SUN realized this apparent naming style violation and
added Color.WHITE etc.

As a client application developer I must now choose between
the non-standard (and possibly soon-to-be-deprecated)
Color.white and the not-backwards-compatible Color.WHITE.

I've ended up with new Color (255, 255, 255) instead.

Which proves that improvements doesn't always bring the
(computing) world forward :)
 
M

Michael Borgwardt

Jacob said:
Which proves that improvements doesn't always bring the
(computing) world forward :)

How could it, when so many people insist on being
backward(s-compatible)?
 
C

Chris Smith

Jacob said:
As a client application developer I must now choose between
the non-standard (and possibly soon-to-be-deprecated)
Color.white and the not-backwards-compatible Color.WHITE.

I've ended up with new Color (255, 255, 255) instead.

There's no need for that. If you're deploying on Java 1.1 (and I'd be
forced to wonder why, but that's another matter...) then use
Color.white. When you're deploying on more recent Java runtime
versions, use Color.WHITE instead. Eventually, people will stop
deploying code on 1.1, and Color.white will go away.

I can say with some certainty that Sun won't remove the old name until
it is well past no longer necessary. (As a reference point, note that
Java 5.0 still provides the same deprecated event model that was made
obsolete by Java 1.1)

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top