paint ( ) in Kaffe's AWT

Ryan Heise rheise at socs.uts.EDU.AU
Tue Jul 21 18:45:07 PDT 1998

On Tue, 21 Jul 1998, Hoe-Teck Wee wrote:

: I've noticed that there appears to be a difference in Kaffe's and JDK's
: implementation of the paint method in the AWT or the KVM. When overriding the
: paint method in a class extending java.applet.Applet, it is necessary to call
: the super.paint() in Kaffe in order that the display may update properly;
: however, this isn't always necessary in JDK, as indicated in some examples in
: Que's Special Edition Using Java 1.1.

Does your applet contain any "real" sub-components? ie. not lightweight?

The 1.1 docs say that Containers paint all lightweight components they
contain and that if you override Container.paint(), you should call
super.paint() to paint those lightweight components. "Real" sub-components
should be painted regardless, though. This looks like a bug in Kaffe, and
another reason why it should stick to the 1.1 api regarding Peers. Kaffe
containers use paint() to paint ALL sub-components, even non-lightweight
ones, so overriding paint() may cause them not to be drawn.

Ryan Heise                   
main(){printf("%d != %d, why?\n", sizeof('"')["'"],(sizeof('"'))["]\"\0["]);}

More information about the kaffe mailing list