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

setFont calls invalidate even though font is not changed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 6
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      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

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: