I'm having a problem with components' tooltips not being rendered correctly when those components are on a glass pane.
What I want to accomplish is this:
I have a JFrame, full of different components. (A huge GUI really.)
On top of this, I want to put a glass pane with a transparent black background.
On the glass pane, I want to show a JPanel with some stuff on it, e.g. JButtons with tooltips.
More or less, I want it to work the same way as a modal dialog, except being a little sexier.
It all works fine, except for the tooltips. It appears that they are rendered beneath the glass pane. I of course want them to show up as if the panel displayed on the glasspane was in its own frame - meaning above everything else.
Is there any way I can make this work the way I want to?
The following code captures the essence of what I'm doing:
Thanks for the tip (heh), but I'm afraid it doesn't help very much.
It makes a little bit of difference though: with heavyweight tooltips, they seem to be rendered above the translucent black background (good), but it's still behind the panel I place on the glass pane (bad).
I thought I got around the problem by using a layered pane instead of a glass pane, but that has introduced another problem I'm not able to find my way around (at least not yet). But that's a different issue.
What flavour of Vista and what Java version do you have? I also use Vista (Business 32-bit SP1) and Java 1.6.0 update 15, and the heavyweight hack doesn't work for me. It works for colleague of mine though, who's running XP and the same Java version as I. So... it really seems quite unpredictable! Maybe the behavior isn't defined and we really can't expect it to work?