title: How to prevent JPopUpMenu disappearing when checking checkboxes in it?
body: <p>I want to use <code>JCheckBoxMenuItem</code>s in a <code>JPopupMenu</code>. It works, but the problem is that the popup menu disappears when a checkbox item has been checked or unchecked. So if one wants to check/uncheck several items, the popup needs to be launched repeatedly, which is irritating.</p>
  
  <p>Curiously, if I use just plain <code>JCheckBox</code> items in the menu (instead of <code>JCheckBoxMenuItem</code>s), the behavior is just as it should be: the popup stays there and the checkboxes can be checked/unchecked. Once done, the popup can be closed just by clicking outside it.</p>
  
  <p>How do I make the popup to behave like that when the items there are <code>JCheckBoxMenuItem</code>s? I would prefer using <code>JCheckBoxMenuItem</code>s because of their looks.</p>