private int parentHeight(){
  Container parent=getParent();
  if (parent != null) {
    return parent.getHeight();
  }
  return getHeight();
}

private int parentHeight ( ) { Container parent = getParent ( ) ; if ( parent != null ) { return parent . getHeight ( ) ; } return getHeight ( ) ; }
return the height of the parent ( which is presumably a jviewport ) . if there is no parent , return this . getheight ( ) .
