From: Jiba <Jea...@im...> - 2002-07-11 10:08:14
|
On 2002.07.10 16:10:02 +0000 guillaume Desticourt wrote: > > hello, > > i've a little problem with the GLAnimCanvas. > in my main window, i've setted a JMenuBar, and when i developpe the JMenu > clicking it, the JMenuItem wich should be on the GLAnimCanvas doesn't > appear. i > think it's normal, but i don't know how to solve this probleme. > any idea? > > thank you for your help. > > the source: > http://www.freenopen.net/~guillaume/fr/prog/gl4java/affiche/GLTestGraphic.java The JMenuItem is SWING whereas the GLAnimCanvas is AWT... A solution is to draw ALL menu in a different window (SWING does not do that by default). For that, call: // The magic line for mixing SWING menus with AWT and GL4Java JPopupMenu.setDefaultLightWeightPopupEnabled(false); At the very beginning of your code. Contrary to what one may understand, it affects all menus and not only popupmenu. Jiba |