[gui][PATCH] Return SystemColors by default
Thomas Fitzsimmons
fitzsim@redhat.com
Fri May 28 12:22:00 GMT 2004
Hi,
I committed this patch to java-gui-branch. It returns appropriate
SystemColors from Component.getBackground and Component.getForeground
when no other colours are set.
Tom
2004-05-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/awt/Component.java (getForeground): Return SystemColor if
parent is null.
(getBackground): Likewise.
Index: java/awt/Component.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/Component.java,v
retrieving revision 1.37.2.10
diff -u -r1.37.2.10 Component.java
--- java/awt/Component.java 27 May 2004 18:40:17 -0000 1.37.2.10
+++ java/awt/Component.java 28 May 2004 04:04:47 -0000
@@ -940,7 +940,7 @@
{
if (foreground != null)
return foreground;
- return parent == null ? null : parent.getForeground();
+ return parent == null ? SystemColor.windowText : parent.getForeground();
}
/**
@@ -981,7 +981,7 @@
{
if (background != null)
return background;
- return parent == null ? null : parent.getBackground();
+ return parent == null ? SystemColor.window : parent.getBackground();
}
/**
More information about the Java-patches
mailing list