The DefaultDesktopManager.setBoundsForFrame requires to repaint the
whole desktop every time when called. All displayed frames are repainted
(the negative effect is more visible if some of them are large and
complex).
This is probably not unnecessary as the Component.reshape already
contains much better optimized code for repainting both parent and
component. Removing these several lines creates no regressions on the
frame manipulation of the swing demo.
2006-05-15 Audrius Meskauskas <[EMAIL PROTECTED]>
* javax/swing/DefaultDesktopManager.java (setBoundForFrame):
Do not repaint nor revalidate here.
Index: DefaultDesktopManager.java
===================================================================
RCS file: /sources/classpath/classpath/javax/swing/DefaultDesktopManager.java,v
retrieving revision 1.17
diff -u -r1.17 DefaultDesktopManager.java
--- DefaultDesktopManager.java 8 May 2006 13:49:44 -0000 1.17
+++ DefaultDesktopManager.java 15 May 2006 10:10:41 -0000
@@ -481,13 +481,6 @@
int newWidth, int newHeight)
{
component.setBounds(newX, newY, newWidth, newHeight);
- component.revalidate();
-
- // If not null, I'd rather repaint the parent
- if (component.getParent() != null)
- component.getParent().repaint();
- else
- component.repaint();
}
/**