public int getPosition ( int line ) { int result = - 1 ; try { result = textArea . getLineStartOffset ( line ) ; } catch ( javax . swing . text . BadLocationException exc ) { } return result ; }
Returns the offset position for the given line .