Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5092883

REGRESSION: SystemColor class gives back wrong values under Linux

XMLWordPrintable

    • b61
    • x86
    • linux

      Name: jl125535 Date: 08/26/2004


      FULL PRODUCT VERSION :
      java version "1.5.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b60)
      Java HotSpot(TM) Client VM (build 1.5.0-beta3-b60, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Suse Linux 8.2

      A DESCRIPTION OF THE PROBLEM :
      I use my own Look and Feel. This LAF inherits the colours from the OS. Using the Java 1.4.x or before it works properly. This version of JAVA displays several GRAY levels instead of real colors.


      REGRESSION. Last worked in version tiger-beta2

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the attached sample program.



      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Text color:-5264475
      Window color:-2830136
      ACTUAL -
      Text color:-3881788
      Window color:-3881788

      (Everyting is Gray)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.*;

      public class SystemColorBug
      {
        public SystemColorBug() {}
        
        public static void main(String arg[])
        {
          try
          {
            System.out.println("Text color:"+SystemColor.text.getRGB());
            System.out.println("Window color:"+SystemColor.window.getRGB());
          }
          catch(Exception ex)
          {
            ex.printStackTrace();
          }
        }
      }

      ---------- END SOURCE ----------

      Release Regression From : 1.4.2
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

      (Incident Review ID: 300554)
      ======================================================================

            dav Andrei Dmitriev (Inactive)
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: