-
Bug
-
Resolution: Fixed
-
P3
-
1.3.0
-
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.
>>
>>
======================================================================
- relates to
-
JDK-4321847 SwingUtilities.paintComponent() causes the VM crash on NT
-
- Resolved
-
-
JDK-4324047 SwingUtilities.paintComponent should ignore heavyweight components
-
- Closed
-
-
JDK-4329260 SwingUtilties.paintComponent() should check for lightweight
-
- Closed
-