Non-opaque components should never get background image
Brought to you by:
kcrca
Using NapkinLAF 1.0 on Java 6/Windows XP.
You can set components (e.g. JLabels) to non-opaque so that their background is transparent (i.e. you can see the components lying behind them).
However, Napkin always adds the crumpled paper image to the background, even if the component is transparent.
See the attached source code. With Metal LAF, the label has black letters on yellow background (because you can see the yellow content pane through it). But with Napkin LAF, it has black letters on crumpled paper.
The obvious solution is just not to add the background image to opaque components. This should also lead to performance improvements.
Bug demo
I think this bug is already fixed in CVS.
In NapkinUtil.paintBackground():
if (!c.isOpaque())
return;
It would be really nice to have a new release soon, as some real progress has been made since 2006.