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.
    Just stick with Color.white. I doubt it will go away.

    Niels Dybdahl
    Niels Dybdahl, Oct 6, 2004
    1. Advertisements

  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
    1. Advertisements

  3. How could it, when so many people insist on being
    Michael Borgwardt, Oct 6, 2004
  4. Niels Dybdahl

    Chris Smith Guest

    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)

    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
    Chris Smith, Oct 6, 2004
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.