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

docs should says: SwingUtilities.paintComponent() supports only lightweight c

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.3.0
    • docs
    • beta
    • sparc
    • solaris_2.6



      Name: aaC67449 Date: 04/07/2000



      The swing.SwingUtilities.paintComponent() was disign to work only with lightweight
      component , but the javadoc say nothing about this.
      The doc should be updated.
      See bugs #4324047 and #4321847, and the Hans Muller mail below for more details

      >Hans Muller writes:
      >
      >>Scott and Brent and I have tracked down the source of this problem (#4321847).
      >>The current test has a bug which triggers the NPE and the javadoc for
      >>the method being tested, SwingUtilities.paintComponent() should be
      >>corrected in a future release. The test should be fixed for RC3. In
      >>the future, once the javadoc has been revised, the test should be
      >>removed as it's checking a case that we did not intend to support.
      >>
      >>
      >>Here are the ugly details. The paintComponent() method was defined
      >>with a Component argument to accommodate Swing cell renderers built
      >>with lightweight components that were derived directly from
      >>java.awt.Component. The paintComponent() was never intended to
      >>support heavyweight components, like the Button used in the JCK test,
      >>since they can't be used as cell renderers, however the javadoc did
      >>not explicitly forbid doing so. Since there is no explicit
      >>lightweight component type, the javadoc should say that the Component
      >>arguments "lightweight" property (see Component.isLightweight()) must
      >>be true. We will tighten up the javadoc in the next release where a
      >>spec change is allowed.
      >>
      >>
       
      ======================================================================

            kwalrathsunw Kathy Walrath (Inactive)
            alisunw Ali Ali (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: