TextHitInfo (final int x, final int y) { if (ApplicationManager.getApplication().isDispatchThread()) return myDelegate.getLocationOffset(x, y); final TextHitInfo[] r = new TextHitInfo[1]; try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { r[0] = myDelegate.getLocationOffset(x, y); } }); } catch (InterruptedException e) { LOG.error(e); } catch (InvocationTargetException e) { LOG.error(e); } return r[0]; }