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