JPopupMenu closing

How can I detect, that a JPopupMenu is being closed ?I want to set a boolean when the menu popsup and to rest it, when it disappears.
[147 byte] By [Hanns-Wa] at [2007-11-26 13:00:05]
# 1
Well add some kind of WindowListener, and listen to windowClosing method.I'm not sure if JPopupMenu has WindowListener, i'm writing this from school...
Sasa_Ivanovica at 2007-7-7 16:59:59 > top of Java-index,Desktop,Core GUI APIs...
# 2
I found it addPopupMenuListener(..)
Hanns-Wa at 2007-7-7 16:59:59 > top of Java-index,Desktop,Core GUI APIs...