-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
5.0
-
x86
-
windows_2000
FULL PRODUCT VERSION :
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
"Subclasses of Component that override this method need not call super.paint(g)."
This is incorrect, and the actual requirements require detective work throughout the inheritance tree, or blindly trying until things work. Since the whole situation is rather "confusing" (this is a euphemism), programmers need all the help they can get, and should not be confronted with inaccuracies or incomplete truths.
An absolute minimal cure is to substitute "Direct subclasses" for "Subclasses".
A good solution seems to require a whole lot more work than that. For example, Canvas says that "The default operation is simply to clear the canvas.", but that apparently already happens outside of paint(), so the default behaviour seems to be to do nothing, but is that true in general, etc. Another example is the initial setup and scope of the Graphics argument, which seems to affect child Component objects as well, according to Container (why?), but it's not immediately clear whether it also affects later siblings and ancestors' later siblings and their descendants, although that seems a likely corrollary, and the consequence seems to be that one should always work with a copy of the supplied Graphics, but how expensive is that, etc., etc.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Test changes until things work and don't desire to fully understand?
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
"Subclasses of Component that override this method need not call super.paint(g)."
This is incorrect, and the actual requirements require detective work throughout the inheritance tree, or blindly trying until things work. Since the whole situation is rather "confusing" (this is a euphemism), programmers need all the help they can get, and should not be confronted with inaccuracies or incomplete truths.
An absolute minimal cure is to substitute "Direct subclasses" for "Subclasses".
A good solution seems to require a whole lot more work than that. For example, Canvas says that "The default operation is simply to clear the canvas.", but that apparently already happens outside of paint(), so the default behaviour seems to be to do nothing, but is that true in general, etc. Another example is the initial setup and scope of the Graphics argument, which seems to affect child Component objects as well, according to Container (why?), but it's not immediately clear whether it also affects later siblings and ancestors' later siblings and their descendants, although that seems a likely corrollary, and the consequence seems to be that one should always work with a copy of the supplied Graphics, but how expensive is that, etc., etc.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Test changes until things work and don't desire to fully understand?