src/java.desktop/share/classes/java/awt/MenuBar.java

Print this page

        

@@ -141,11 +141,11 @@
      * functionality.
      */
     public void addNotify() {
         synchronized (getTreeLock()) {
             if (peer == null)
-                peer = Toolkit.getDefaultToolkit().createMenuBar(this);
+                peer = getComponentFactory().createMenuBar(this);
 
             int nmenus = getMenuCount();
             for (int i = 0 ; i < nmenus ; i++) {
                 getMenu(i).addNotify();
             }