jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java
changeset 13147 eada40c7d74d
parent 7668 d4a77089c587
child 20168 137788883a22
--- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Wed Jun 27 12:54:48 2012 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthMenuUI.java	Thu Jun 28 14:05:06 2012 +0400
@@ -299,7 +299,8 @@
      */
     @Override
     public void propertyChange(PropertyChangeEvent e) {
-        if (SynthLookAndFeel.shouldUpdateStyle(e)) {
+        if (SynthLookAndFeel.shouldUpdateStyle(e) ||
+                (e.getPropertyName().equals("ancestor") && UIManager.getBoolean("Menu.useMenuBarForTopLevelMenus"))) {
             updateStyle((JMenu)e.getSource());
         }
     }