title: How many rows is a JTable currently displaying?
body: <p>JTable has a method getVisibleRowCount(), which shows the <em>preferred</em> number of rows to display.</p>
  
  <p>I want to determine the <em>actual</em> number of rows currently visible in a JTable. How can I do this?</p>
  
  <p>My current attempt is:</p>
  
  <pre><code>int rowsVisible = table.getSize().getHeight()/table.getRowHeight();
  </code></pre>
  
  <p>but the value it gives me is quite higher than what I can see.</p>
  
  <p>For example, when there are 10 or 11 rows visible, this gives me a result of 18.</p>