Using Jogl in a swing application I am having trouble with menus, jcomboboxen and such being stuck behind the canvas. That is every part of the components that is outside the canvas is visible, but the part of the component being shown on top of the canvas is hidden. is there any quick fix for this?
You are using the “heavyweight” GLCanvas for rendering, which is the fastest option, but limited in it’s swing interoperability. Either use GLJPanel, that is swing conform but slower, or use “JPopupMenu.setDefaultLightWeightPopupEnabled(false)”. Be prepared to have more problems regarding swing with GLCanvas. See Mixing heavy and light components for general background information.
I get it…I sure hope the GLJPanel is improved at a later point so this will not be an issue any more.
However my problem is not related to JPopupMenu, but rather a JMenuBar so that setDefaultLightweight thingy wont work (I checked and JMenuBar doesnt have that method). If I use a AWT-menu it work, but look like crap
The method is static in JPopupMenu and effects all menu like popups
Ahh…not very intuitive
It works now. Thanks you so much.
I have a small followup to this question; What about tooltips? They have the same issue. Disapearing behind the canvas, and even behind the popupmenu that created them if lightweightcomponent thingy is set to false. Any quickfix for this as well?
I do have the same problem… however i need the canvas for some of their methods like getBufferStrategy()
so how do I solve this problem?? ???
…and so are you it seems. Thank you my friend
always happy to help!