protected void computeLinks(Element e) throws BadLocationException {
  int caretPos=getCaretPosition();
  try {
    if (isLink(e))     correctLink(e);
 else     createLink(e);
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  setCaretPosition(Math.min(caretPos,getLength()));
}

protected void computeLinks ( Element e ) throws BadLocationException { int caretPos = getCaretPosition ( ) ; try { if ( isLink ( e ) ) correctLink ( e ) ; else createLink ( e ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } setCaretPosition ( Math . min ( caretPos , getLength ( ) ) ) ; }
this method corrects or creates a url contained in an element as an hyperlink .
