bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug awt/24407] New: Component.getForeground() never returns null


From: david dot gilbert at object-refinery dot com
Subject: [Bug awt/24407] New: Component.getForeground() never returns null
Date: 17 Oct 2005 11:22:29 -0000

The getForeground() method returns a default value (SystemColor.windowText) if
the foreground field is null, whereas the reference implementation returns
null.  I've added a Mauve test to show this (java.awt.Component.getForeground).

This is causing a problem in the Swing look and feel code, where the look and
feel default color is only installed if the existing color is null or an
instance of UIResource.  Since neither of those conditions is met, the
foreground color for the Swing component is not set.

I could probably fix the bug myself, but I'd rather that someone familiar with
the AWT code looked at it because I'm not sure what else depends on the current
(incorrect) behaviour of this method.

Regards,

Dave


-- 
           Summary: Component.getForeground() never returns null
           Product: classpath
           Version: 0.18
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: awt
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot gilbert at object-refinery dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24407





reply via email to

[Prev in Thread] Current Thread [Next in Thread]