From 627e4e5fc2e189846e59f0b1d44182b319afba3b Mon Sep 17 00:00:00 2001 From: David Jee Date: Wed, 7 Jan 2004 21:20:01 +0000 Subject: 2004-01-07 David Jee * java/awt/Container.java (update): Clear only the clipped region, instead of clearing the entire Container. (visitChildren): Visit children in descending order. From-SVN: r75517 --- libjava/java/awt/Container.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/awt/Container.java b/libjava/java/awt/Container.java index ad43ce4..763cfbb 100644 --- a/libjava/java/awt/Container.java +++ b/libjava/java/awt/Container.java @@ -677,7 +677,11 @@ public class Container extends Component */ public void update(Graphics g) { - g.clearRect(0, 0, width, height); + Rectangle clip = g.getClipBounds(); + if (clip == null) + g.clearRect(0, 0, width, height); + else + g.clearRect(clip.x, clip.y, clip.width, clip.height); super.update(g); } @@ -1196,7 +1200,7 @@ public class Container extends Component { synchronized (getTreeLock ()) { - for (int i = 0; i < ncomponents; ++i) + for (int i = ncomponents - 1; i >= 0; --i) { Component comp = component[i]; boolean applicable = comp.isVisible() -- cgit v1.1