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

Print this page

        

@@ -91,17 +91,16 @@
     }
 
     /**
      * Creates the peer of the canvas.  This peer allows you to change the
      * user interface of the canvas without changing its functionality.
-     * @see     java.awt.Toolkit#createCanvas(java.awt.Canvas)
      * @see     java.awt.Component#getToolkit()
      */
     public void addNotify() {
         synchronized (getTreeLock()) {
             if (peer == null)
-                peer = getToolkit().createCanvas(this);
+                peer = getComponentFactory().createCanvas(this);
             super.addNotify();
         }
     }
 
     /**