private void positionOverlayControls(){
  if (isVisible()) {
    Dimension controlsSize=overlayControls.getSize();
    Dimension windowSize=getSize();
    Point windowPos=getLocationOnScreen();
    Point controlPos=new Point();
    controlPos.x=(int)((windowSize.width - controlsSize.width) * 0.5 + windowPos.x);
    controlPos.y=(int)((windowSize.height - controlsSize.height) - 20 + windowPos.y);
    overlayControls.setLocation(controlPos);
  }
}

private void positionOverlayControls ( ) { if ( isVisible ( ) ) { Dimension controlsSize = overlayControls . getSize ( ) ; Dimension windowSize = getSize ( ) ; Point windowPos = getLocationOnScreen ( ) ; Point controlPos = new Point ( ) ; controlPos . x = ( int ) ( ( windowSize . width - controlsSize . width ) * 0.5 + windowPos . x ) ; controlPos . y = ( int ) ( ( windowSize . height - controlsSize . height ) - 20 + windowPos . y ) ; overlayControls . setLocation ( controlPos ) ; } }
positions the overlay control centered horizontally and 80 % down vertically
