> > On Wed, 26 Oct 2005 07:52:41 +0200, "Andrey Kuznetsov"
> > <spam0@imagero.com.invalid> wrote, quoted or indirectly quoted someone
[quoted text clipped - 9 lines]
> > Good idea. that would avoid generating stacktraces for ordinary
> > repaints.
> The message is indeed a paintImmediately (actually _paintImmediately())
> called directly on this label by the system.
To clarify, this is the normal way repainting is actually done, so this
is just the normal reaction to an earlier repaint().
In all Java 1.5 versions I have here, the label is not repainted if it
has no mnemonics, while in 1.4 this check is missing. There is nothing
to avoid this, except replacing WindowsRootPaneUI (probably completely).
> My purpose in all of this was to avoid repainting labels at certain times
> because I was overlapping some of them with a semi-transparent JPanel.
> I could take control of the painting of the labels, but I haven't found a
> way to ask, "am I obscured by another component?" (beyond checking for
> componentAt for every pixel of the label).
> Currently when someone hit's the ALT key, all the JLabels paint right
> through my semi-transparent layer.
If this causes real painting problems (pixel garbage), then it is not set up
correctly (isOpaque).
Christian