jmenuitem desapearing behind the draw

hi

i have a basic window with a jmenubar and a canvas

if a do a show/pack of the window it pops as a small bar, when i stretch it, everything works fine

but if i do a setsize on the canvas, when i click on a jmenu, the jmenuitems pop under the canvas

i’m new to opengl/jogl, is there a simple trick to avoid that ?

this has appeared a few times in the forums. i suggest you do a search.
however, take a look at setting the jmenuitem to draw as a heavyweight component. normally they are lightweight and will be draw UNDER the heavyweight canvas. if you make it heavy too it will draw ABOVE the canvas.

thx

Here is the solution for your convenience:
myMenu.getPopupMenu().setLightWeightPopupEnabled(false);