swings JPopupMenu over GLCanvas not working since java6u2

i dont know, if this is a know problem already, but we have noticed that swing popups over a GLCanvas, like JPopupMenu dont work anymore since java6 update2 and later. they do infact work with java6 update1 and before.

the problem looks like this: they popup, but have no decoration (border, icons, etc) they also do not react on mouse-over events and they do not hide themselves (they remain visible forever)

has anyone experienced the same issues? if so, does anyone know a workaround for this?

i already tried
JPopupMenu.setDefaultLightWeightPopupEnabled(false);
ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
but without any change.

Hello,

I’ve implemented an popupmenu just yesterday and it works fine. (It’s an menu that popups on an object so you can rotate it easily)
I’m running Java version: JDK 1.6.0_2-b05.

And I specify: JPopupMenu.setDefaultLightWeightPopupEnabled( false ); because glCanvas is an heavyweight component;

thanks for the information! that is interesting

however i just tried our application again with java6 update2 and it fails to correctly display the popup over the glcanvas.
it does however work if it is displayed over a regular swing component.

I found with a third-party app that you need to call this method really early. I don’t know the exact constraints but definitely if you call it too late (possibly after creating some Swing components?) then it won’t take effect. How early you need to call it in your app might have changed, but I doubt the functionality was broken in 6u2.

thanks,
i now tried putting these two lines as the first thing in the application, like this:

public static void main(String[] args) {
	
	ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false);
	JPopupMenu.setDefaultLightWeightPopupEnabled(false); 
	.....

however, it still does not work.
would it help, if i would provide a testcase?

incase anyone is interested, this problem can be fixed by providing an actual invoker either through setInvoker() or show(invoker, x,y)

if the invoker is null, this problem occurs.

Can you provide a test case? I’ll ask the Swing team whether this is intended behavior.