Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

20000822: Heavyweight Menus

>From: Doug Lindholm <lind@xxxxxxxx>
>Organization: NCAR
>Keywords: 200008221849.e7MInhN14474

Doug-

>There was some previous discussion about wanting to have a JMenu appear
>over a 3D display. The "solution" that was offered was to keep your 3D
>displays away from the JMenuBar. I've stumbled upon a solution, sorry if
>this is obvious to some of you:
>
>  JMenuBar menuBar = new JMenuBar();
>  JMenu menu = new JMenu();
>  menu.getPopupMenu().setLightWeightPopupEnabled(false); //this is the
>key 
>  menuBar.add(menu);

I've tried this with mixed results.  I get a lot more flashing of
the display when I use these lightweight menus which I find extremely
annoying.  At one point, I ran into a problem where the flashing was
continuous, and sucked up my CPU.  Going back to AWT menus made that
problem go away.  Let me know if you run into any problems using
this.

Don
*************************************************************
Don Murray                               UCAR Unidata Program
dmurray@xxxxxxxxxxxxxxxx                        P.O. Box 3000
(303) 497-8628                              Boulder, CO 80307
*************************************************************
Unidata WWW Server               http://www.unidata.ucar.edu/
McIDAS Demonstration Machine  http://mcdemo.unidata.ucar.edu/
*************************************************************


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690