private int componentYCenter(Component component){
  return component.getY() + component.getHeight() / 2;
}

private int componentYCenter ( Component component ) { return component . getY ( ) + component . getHeight ( ) / 2 ; }
get the vertical center point of a component .
