Color.white vs. Color.WHITE

Discussion in 'Java' started by Niels Dybdahl, Oct 6, 2004.

  1. > 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
    Niels Dybdahl, Oct 6, 2004
    #1
    1. Advertising

  2. Niels Dybdahl

    Jacob Guest

    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 :)
    Jacob, Oct 6, 2004
    #2
    1. Advertising

  3. Jacob wrote:
    > 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)?
    Michael Borgwardt, Oct 6, 2004
    #3
  4. Niels Dybdahl

    Chris Smith Guest

    Jacob wrote:
    > 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
    Chris Smith, Oct 6, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. -
    Replies:
    9
    Views:
    449
    Roland
    Mar 25, 2005
  2. Roedy Green

    Color.WHITE gotcha

    Roedy Green, Feb 5, 2006, in forum: Java
    Replies:
    1
    Views:
    332
    Lee Weiner
    Feb 5, 2006
  3. Ben C
    Replies:
    6
    Views:
    2,136
    Leif K-Brooks
    Jan 28, 2007
  4. semaphore
    Replies:
    0
    Views:
    681
    semaphore
    Feb 26, 2009
  5. Kamaljeet Saini
    Replies:
    0
    Views:
    391
    Kamaljeet Saini
    Feb 13, 2009
Loading...

Share This Page