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

AW: JPopupMenu

Hi Karan,

> 2. We want to add the pop up menu when working with
> DisplayImlJ2D. WE are able to see the pop up menu, but
> it occupied full panel and we cannot see anyhting
> other than this pop up menu. We tried even setSize()
> method also and it is the same always. Please help me
> with this.

That sounds strange to me. But take a look at JPopupMenu.pack() which
should give your popup menu the right size or JPopupMenu.setPopupSize()
with which you can specify the size of your popup menu manually. By the
way, don't try to use setSize() with any JComponent. Instead use
setPreferredSize(), setMaximumSize() and setMinimumSize().

Hope that helps, Mathias


 
 
  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