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


  • 2001 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: