// but rather use a deferred approach like this.
private final class PopupMenuDisplayerImpl implements PopupMenuDisplayer {
@Override
public void showPopupMenu(PopupMenuSite site, List<?> objects, Component invoker, int x, int y) {
PopupMenuDisplayer impl = view.getPopupMenuManager();
if (impl != null) {
impl.showPopupMenu(site, objects, invoker, x, y);
}
}