public void setRenderHandler(@NotNull JBCefOsrHandler renderHandler) {
    myRenderHandler = renderHandler;

    myRenderHandler.addCaretListener(myInputMethodAdapter);

    addAncestorListener(new AncestorListenerAdapter() {
      @Override
      public void ancestorAdded(AncestorEvent event) { myRenderHandler.setLocationOnScreen(getLocationOnScreen()); }

      @Override
      public void ancestorMoved(AncestorEvent event) { myRenderHandler.setLocationOnScreen(getLocationOnScreen()); }
    });

    try {
      myRenderHandler.setLocationOnScreen(getLocationOnScreen());
    } catch (IllegalComponentStateException t) {
      // The component isn't shown
    }

    addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        myRenderHandler.setLocationOnScreen(getLocationOnScreen());
      }
    });
  }
public void setRenderHandler(@NotNull JBCefOsrHandler renderHandler)