News Flash: Lightweights knock out Heavyweight!
Notice what happens in our applet:
- When the background is a simple color, it appears that all is well with the components; both heavy and light components appear fine.
- But when we add a complex background, the opaque background of the heavyweight becomes evident.
- Notice also the crucial role played by the super.paint() method for the lightweight (without it, the lightweight isn’t drawn).