< prev index next >

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

Print this page

        

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