JMenubar

Hi,

I just had the problem, that a popup of a menubar was not showed over a JMECanvas. That's because the JMenuBar is leightweight, but the canvas is heavyweight. The solution is to make the JMenuBar heavyweight. Here is an example:


JMenuBar jMenuBar1 = new JMenuBar();
         setJMenuBar(jMenuBar1);
         {
            JMenu jMenu1 = new JMenu();
            jMenu1.getPopupMenu().setLightWeightPopupEnabled(false);
            jMenuBar1.add(jMenu1);
            jMenu1.setText("Fractal");
            {
               JRadioButtonMenuItem jRadioButtonMenuItem1 = new JRadioButtonMenuItem();
               jMenu1.add(jRadioButtonMenuItem1);
               jRadioButtonMenuItem1.setText("Mandelbrot");
            }
            {
               JRadioButtonMenuItem jRadioButtonMenuItem2 = new JRadioButtonMenuItem();
               jMenu1.add(jRadioButtonMenuItem2);
               jRadioButtonMenuItem2.setText("Julia");
            }
         }



Best,
Andreas

Or you can call:


JPopupMenu.setDefaultLightWeightPopupEnabled(false);


At the initialization of your application, which will cause all created menus to be heavyweight.

Thanks!