protected void createBuffers(int numBuffers,BufferCapabilities caps) throws AWTException {
  if (numBuffers < 2) {
    throw new IllegalArgumentException("Number of buffers cannot be less than two");
  }
 else   if (peer == null) {
    throw new IllegalStateException("Component must have a valid peer");
  }
 else   if (caps == null || !caps.isPageFlipping()) {
    throw new IllegalArgumentException("Page flipping capabilities must be specified");
  }
  width=getWidth();
  height=getHeight();
  if (drawBuffer != null) {
    drawBuffer=null;
    drawVBuffer=null;
    destroyBuffers();
  }
  if (caps instanceof ExtendedBufferCapabilities) {
    ExtendedBufferCapabilities ebc=(ExtendedBufferCapabilities)caps;
    if (ebc.getVSync() == VSYNC_ON) {
      if (!VSyncedBSManager.vsyncAllowed(this)) {
        caps=ebc.derive(VSYNC_DEFAULT);
      }
    }
  }
  peer.createBuffers(numBuffers,caps);
  updateInternalBuffers();
}

protected void createBuffers ( int numBuffers , BufferCapabilities caps ) throws AWTException { if ( numBuffers < 2 ) { throw new IllegalArgumentException ( "Number of buffers cannot be less than two" ) ; } else if ( peer == null ) { throw new IllegalStateException ( "Component must have a valid peer" ) ; } else if ( caps == null || ! caps . isPageFlipping ( ) ) { throw new IllegalArgumentException ( "Page flipping capabilities must be specified" ) ; } width = getWidth ( ) ; height = getHeight ( ) ; if ( drawBuffer != null ) { drawBuffer = null ; drawVBuffer = null ; destroyBuffers ( ) ; } if ( caps instanceof ExtendedBufferCapabilities ) { ExtendedBufferCapabilities ebc = ( ExtendedBufferCapabilities ) caps ; if ( ebc . getVSync ( ) == VSYNC_ON ) { if ( ! VSyncedBSManager . vsyncAllowed ( this ) ) { caps = ebc . derive ( VSYNC_DEFAULT ) ; } } } peer . createBuffers ( numBuffers , caps ) ; updateInternalBuffers ( ) ; }
creates one or more complex , flipping buffers with the given capabilities .
