public void removeLineAt(int pos) throws BadLocationException {
  Element e=getParagraphElement(pos);
  remove(e.getStartOffset(),getElementLength(e));
}

public void removeLineAt ( int pos ) throws BadLocationException { Element e = getParagraphElement ( pos ) ; remove ( e . getStartOffset ( ) , getElementLength ( e ) ) ; }
deletes the line at given position
