code: public void showAt(final int x, final int y) {
  
          setPopupPositionAndShow(new PopupPanel.PositionCallback() {
  
              @Override
              public void setPosition(int offsetWidth, int offsetHeight) {
  
                  int left = x + Window.getScrollLeft();
                  int top = y + Window.getScrollTop();
  
                  int exceedingWidth = (offsetWidth + left) - (Window.getClientWidth() + Window.getScrollLeft());
                  if (exceedingWidth > 0) {
                      left -= exceedingWidth;
                      if (left < 0) {
                          left = 0;
                      }
                  }
  
                  int exceedingHeight = (offsetHeight + top) - (Window.getClientHeight() + Window.getScrollTop());
                  if (exceedingHeight > 0) {
                      top -= exceedingHeight;
                      if (top < 0) {
                          top = 0;
                      }
                  }
  
                  setPopupPosition(left, top);
              }
          });
      }
docs: Shows the overlay at the given position.<p>
  
  @param x the client x position
  @param y the client y position