< prev index next >

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

Print this page

        

*** 4028,4040 **** */ int height; /** * Creates a new flipping buffer strategy for this component. ! * The component must be a <code>Canvas</code> or <code>Window</code>. * @see Canvas * @see Window * @param numBuffers the number of buffers * @param caps the capabilities of the buffers * @exception AWTException if the capabilities supplied could not be * supported or met * @exception ClassCastException if the component is not a canvas or --- 4028,4042 ---- */ int height; /** * Creates a new flipping buffer strategy for this component. ! * The component must be a <code>Canvas</code> or <code>Window</code> or ! * <code>Applet</code>. * @see Canvas * @see Window + * @see Applet * @param numBuffers the number of buffers * @param caps the capabilities of the buffers * @exception AWTException if the capabilities supplied could not be * supported or met * @exception ClassCastException if the component is not a canvas or
*** 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); } --- 4049,4063 ---- */ 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 >