Trivial fix. (Saves a lot of repainting.)
2005-06-02 Sven de Marothy <[EMAIL PROTECTED]>
* java/awt/Component.java
(setBackgroundColor): Return if the color equals the existing bgcolor.
Index: java/awt/Component.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Component.java,v
retrieving revision 1.58
diff -u -r1.58 Component.java
--- java/awt/Component.java 25 May 2005 22:14:19 -0000 1.58
+++ java/awt/Component.java 2 Jun 2005 16:40:04 -0000
@@ -1005,6 +1005,10 @@
*/
public void setBackground(Color c)
{
+ // return if the background is already set to that color.
+ if (background != null && c != null)
+ if (background.equals(c))
+ return;
// If c is null, inherit from closest ancestor whose bg is set.
if (c == null && parent != null)
c = parent.getBackground();
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches