public boolean show(Container c,int x,int y,int w,int h){
synchronized (this) {
    if (painting) {
      return false;
    }
    showing=true;
  }
  try {
    BufferInfo info=getBufferInfo(c);
    BufferStrategy bufferStrategy;
    if (info != null && info.isInSync() && (bufferStrategy=info.getBufferStrategy(false)) != null) {
      SubRegionShowable bsSubRegion=(SubRegionShowable)bufferStrategy;
      boolean paintAllOnExpose=info.getPaintAllOnExpose();
      info.setPaintAllOnExpose(false);
      if (bsSubRegion.showIfNotLost(x,y,(x + w),(y + h))) {
        return !paintAllOnExpose;
      }
      bufferInfo.setContentsLostDuringExpose(true);
    }
  }
  finally {
synchronized (this) {
      showing=false;
      notifyAll();
    }
  }
  return false;
}

public boolean show ( Container c , int x , int y , int w , int h ) { synchronized ( this ) { if ( painting ) { return false ; } showing = true ; } try { BufferInfo info = getBufferInfo ( c ) ; BufferStrategy bufferStrategy ; if ( info != null && info . isInSync ( ) && ( bufferStrategy = info . getBufferStrategy ( false ) ) != null ) { SubRegionShowable bsSubRegion = ( SubRegionShowable ) bufferStrategy ; boolean paintAllOnExpose = info . getPaintAllOnExpose ( ) ; info . setPaintAllOnExpose ( false ) ; if ( bsSubRegion . showIfNotLost ( x , y , ( x + w ) , ( y + h ) ) ) { return ! paintAllOnExpose ; } bufferInfo . setContentsLostDuringExpose ( true ) ; } } finally { synchronized ( this ) { showing = false ; notifyAll ( ) ; } } return false ; }
shows the specified region of the back buffer . this will return true if successful , false otherwise . this is invoked on the toolkit thread in response to an expose event .
