public void update(Graphics g){
  if (isShowing()) {
    if (!(peer instanceof LightweightPeer)) {
      g.clearRect(0,0,width,height);
    }
    paint(g);
  }
}

public void update ( Graphics g ) { if ( isShowing ( ) ) { if ( ! ( peer instanceof LightweightPeer ) ) { g . clearRect ( 0 , 0 , width , height ) ; } paint ( g ) ; } }
updates the container . this forwards the update to any lightweight components that are children of this container . if this method is reimplemented , super . update ( g ) should be called so that lightweight components are properly rendered . if a child component is entirely clipped by the current clipping setting in g , update ( ) will not be forwarded to that child .
