Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6213660

setFont calls invalidate even though font is not changed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 6
    • 5.0
    • client-libs
    • b24
    • x86
    • windows_xp
    • Verified

    Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Calling setFont() with the current font, always calls invalidate() if the component is valid.

      Higher level classes (JComponent) perform an equality check before calling revalidate() but this is not really helpful, since they always call the baseclass setFont() which always calls invalidate().

      Component.setFont() needs to perform the same equality checks as JComponent.setFont() before calling invalidate, otherwise the optimizations in JComponent are not useful.




      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Override setFont() to perform equality checks before calling baseclass.
      ###@###.### 2005-1-04 06:54:10 GMT

      Attachments

        Activity

          People

            dav Andrei Dmitriev (Inactive)
            jssunw Jitender S (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: