We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29164c3 commit e334896Copy full SHA for e334896
sources/net.sf.j2s.java.core/src/javax/swing/JMenu.java
@@ -337,7 +337,9 @@ public void setPopupMenuVisible(boolean b) {
337
// System.out.println("in JMenu.setPopupMenuVisible " + b);
338
// // Thread.dumpStack();
339
// }
340
-//
+
341
+ if (b && popupMenu.getPeer() == null)
342
+ popupMenu.addNotify();// BH SwingJS
343
boolean isVisible = isPopupMenuVisible();
344
if (b != isVisible && (isEnabled() || !b)) {
345
ensurePopupMenuCreated();
@@ -544,7 +546,6 @@ private void ensurePopupMenuCreated() {
544
546
this.popupMenu = new JPopupMenu();
545
547
popupMenu.setInvoker(this);
548
popupListener = createWinListener(popupMenu);
- popupMenu.addNotify();// BH SwingJS
549
}
550
551
0 commit comments