classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] FYI: Removed calls to repaint/revalidate in JComponent


From: Roman Kennke
Subject: [cp-patches] FYI: Removed calls to repaint/revalidate in JComponent
Date: Thu, 30 Jun 2005 22:18:48 +0200

Hi,

the attached patch removes all calls to repaint() and revalidate() from
JComponent. At least two of these were causing infinite loops with the
RepaintManager. I am aware of the possibility that this move can cause
some regressions in Swing. You will likely see some artifacts or GUI not
updated appropriatly. This must be fixed, but in another place. If at
all, the repaint() and revalidate() methods should be called from within
a UI class, likely from a PropertyChangeListener. This must be evaluated
on a per-case basis. Additionally, in almost all cases a repaint() call
would do, revalidate() calls are really only necessary when the size of
a component changes. They can be very costly, because in the worst case
the whole containment hierarchy must be revalidated.

2005-06-30  Roman Kennke  <address@hidden>

        * javax/swing/JComponent.java:
        Removed all calls to repaint() and revalidate(). These are
        likely causing infinite loops with the RepaintManager.

/Roman

Attachment: 03_JComponent.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]