title: JavaFX: How to get number of rows of table view that are showing in virtual flow
body: <p>I want to get number of rows for current virtual flow of table view
  For Example, i have a table view of 1000 rows and table view shows only 50 rows for each page, how to get this "50" if the table view was responsive and can be 
  re-sized .</p>
  
  <p>Summery, i want keep my table view rows shows correctly, no row that half of it was hidden and another visible</p>
  
  <p>please help me, and thanks in advance</p>
  
  <p>This is an examples of problem:</p>
  
  <pre><code>            package application;
  
              import javafx.application.Application;
              import javafx.scene.Scene;
              import javafx.scene.control.TableColumn;
              import javafx.scene.control.TableView;
              import javafx.scene.control.TextField;
              import javafx.scene.control.cell.PropertyValueFactory;
              import javafx.scene.layout.BorderPane;
              import javafx.scene.layout.Region;
              import javafx.stage.Stage;
  
  
              public class Main extends Application {
                  @Override
                  public void start(Stage primaryStage) {
                      try {
  
                          //This is table view that will view model information
                          TableView&lt;Person&gt; table = new TableView&lt;&gt;();
  
                          //First name column to view first name attribute of person model
                          TableColumn&lt;Person, String&gt; firstName = new TableColumn&lt;&gt;("First Name");
                          firstName.setCellValueFactory(new PropertyValueFactory&lt;&gt;("firstName"));
  
                          //Last name column to view first name attribute of person model
                          TableColumn&lt;Person, String&gt; lastName = new TableColumn&lt;&gt;("Last Name");
                          lastName.setCellValueFactory(new PropertyValueFactory&lt;&gt;("lastName"));
  
                          //Add this columns to table view
                          table.getColumns().add(firstName);
                          table.getColumns().add(lastName);
  
                          //Set dummy list of person to table view
                          for (int i = 0; i &lt; 1000; i++) {
                              table.getItems().add(new Person("First Name" + i, "Last Name" + i));
                          }
  
                          //create TextField and bind what i want to its text property
                          //And what i want is : Number of rows that show on table virtual flow, by other words 
                          //that number of rows that is visible to me now according to table height
                          TextField box = new TextField();
                          // ????????????????? 
                          // ?????????????????
  
                          //Add table and box to border pane
                          BorderPane root = new BorderPane();
                          root.setCenter(table);
                          root.setBottom(box);
  
                          Scene scene = new Scene(root, 400, 400);
                          primaryStage.setScene(scene);
                          primaryStage.show();
  
                      } catch(Exception e) {
                          e.printStackTrace();
                      }
                  }
  
                  //This is model class
                  public class Person{
                      private String firstName;
                      private String lastName;
  
                      public Person(String firstName, String lastName) {
                          super();
                          this.firstName = firstName;
                          this.lastName = lastName;
                      }
                      public String getFirstName() {
                          return firstName;
                      }
                      public void setFirstName(String firstName) {
                          this.firstName = firstName;
                      }
                      public String getLastName() {
                          return lastName;
                      }
                      public void setLastName(String lastName) {
                          this.lastName = lastName;
                      }
                  }
  
                  public static void main(String[] args) {
                      launch(args);
                  }
              }
  </code></pre>