title: Method that returns the line number for a given JTextPane position?
body: <p>I'm looking for a method that computes the line number of a given text position in a JTextPane with wrapping enabled.</p>
  
  <p>Example:</p>
  
  <blockquote>
    <p>This a very very very very very very very very very very very very very very very very very very very very very very long line.<br>
    This is another very very very very very very very very very very very very very very very very very very very very very very long line.<strong>|</strong></p>
  </blockquote>
  
  <p>The cursor is on line number four, not two.</p>
  
  <p>Can someone provide me with the implementation of the method:</p>
  
  <pre><code>int getLineNumber(JTextPane pane, int pos)
  {
       return ???
  }
  </code></pre>