From 9b1ad90931839deb59a4f8625ce80cf8644ceee4 Mon Sep 17 00:00:00 2001 From: djee 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75517 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 ad43ce41a92..763cfbb9b30 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.2.3