public void mouseMoved(MouseEvent e) {
AccessibleJTextComponent context = (AccessibleJTextComponent) getAccessibleContext()
.getAccessibleEditableText();
AccessibleHypertext accText = (AccessibleHypertext) context
.getAccessibleText();
int index = accText.getIndexAtPoint(e.getPoint());
int linkIndex = accText.getLinkIndex(index);
if (linkIndex == -1) {
setToolTipText(null);
return;
}
String linkDesc = accText.getLink(linkIndex)
.getAccessibleActionDescription(0);
String toolTipText = "<html><body style='margin: 3'>"
+ linkDesc
+ "<br><b>CTRL + click to follow link</b></body></html>";