void (MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_PRESSED && myHint != null) { myInitialPress = null; StyledDocument document = (StyledDocument)getDocument(); int x = e.getX(); int y = e.getY(); if (!hasTextAt(document, x, y) && !hasTextAt(document, x + 3, y) && !hasTextAt(document, x - 3, y) && !hasTextAt(document, x, y + 3) && !hasTextAt(document, x, y - 3)) { myInitialPress = e.getPoint(); } } super.processMouseEvent(e); }