I have a such code below to create and show popupmenu. Popupmenu appear when I need. I choose menu "Menu1" and object JPanel appear as I wish. JPanel contains JFormattedTextField,JComboBox and JButton. When I try to choose the item from JComboBox the main popup menu disapper. What should I do to prevent such behaviour? Thanks a lot!
[ January 11, 2008: Message edited by: Oleg Vasylenko ]
Well - there is a PopupMenuListener, that has a method, popupMenuWillBecomeInvisible() - this is called just before the popup menu disappears. I'd guess that you could interrupt this and stop it from happening.
However - it doesn't sound like the best approach - is there a particular reason that you need to use a JPopupMenu for it, rather than something else, like a JDialog?
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
Gift giving made easy with the permaculture playing cards