< prev index next >

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

Print this page

        

@@ -4047,14 +4047,15 @@
          */
         protected FlipBufferStrategy(int numBuffers, BufferCapabilities caps)
             throws AWTException
         {
             if (!(Component.this instanceof Window) &&
-                !(Component.this instanceof Canvas))
+                !(Component.this instanceof Canvas) &&
+                !(Component.this instanceof Applet))
             {
                 throw new ClassCastException(
-                    "Component must be a Canvas or Window");
+                    "Component must be a Canvas or Window or Applet");
             }
             this.numBuffers = numBuffers;
             this.caps = caps;
             createBuffers(numBuffers, caps);
         }
< prev index next >