title: Javafx 2 : Vertical scrollbar on TableView doesn't Visible, how to fix this?
body: <p>The TableView has a built-in scroll bar, but why do I not see the vertical scroll bar?</p>
  
  <p>Here is my code when I put TableView in a HBox:</p>
  
  <pre><code>HBox HBox_tabelDatabase = new HBox();
                  HBox_tabelDatabase.setAlignment(Pos.TOP_CENTER);
                  HBox_tabelDatabase.setPadding(new Insets(5,5,5,5));
                  HBox_tabelDatabase.setStyle(  "-fx-border-style: solid;"
                  + "-fx-border-width: 1;"
                  + "-fx-border-color: #ADDFFF;"
                  + "-fx-accent: #ADDFFF;"
                  + "-fx-accent: #ADDFFF;"
                 + "-fx-base:  #ADDFFF;"
                  + "-fx-background: white;"
                  + "-fx-control-inner-background: white;"
                  + "-fx-focus-color: #ADDFFF;"
                  + "-fx-dark-text-color: deepskyblue;"
                  + "-fx-mid-text-color: black;"
                  + "-fx-light-text-color: blue;");
  
  Tab tab6 = new Tab();
  
  HBox_tabelDatabase.getChildren().add(tableview);
  HBox_tabelDatabase.setPrefHeight(200);
  
  tab6.setText("Tabel Database");
  tab6.setContent(HBox_tabelDatabase);
  </code></pre>
  
  <p>Here is my code to define TableView and its columns and rows:</p>
  
  <pre><code>private void buildData(){
            Connection c ;
            data = FXCollections.observableArrayList();
            try{
              c = DBConnect.connect();
              //SQL FOR SELECTING ALL OF APP.tabelJembatan
              String SQL = "SELECT * from APP.tabelJembatan";
              //ResultSet
              ResultSet rs = c.createStatement().executeQuery(SQL);
  
              /**********************************
               * TABLE COLUMN ADDED DYNAMICALLY *
               **********************************/
              for(int i=0 ; i&lt;rs.getMetaData().getColumnCount(); i++){
                  //We are using non property style for making dynamic table
                  final int j = i;                
                  TableColumn col = new TableColumn(rs.getMetaData().getColumnName(i+1));
                  col.setCellValueFactory(new Callback&lt;TableColumn.CellDataFeatures&lt;ObservableList,String&gt;,ObservableValue&lt;String&gt;&gt;(){                    
                      public ObservableValue&lt;String&gt; call(TableColumn.CellDataFeatures&lt;ObservableList, String&gt; param) {                                                                                              
                          return new SimpleStringProperty(param.getValue().get(j).toString());                        
                      }                    
                  });
  
                  tableview.getColumns().addAll(col); 
                  col.setMinWidth(200);
                  System.out.println("Column ["+i+"] ");
              }
  
              /********************************
               * Data added to ObservableList *
               ********************************/
              while(rs.next()){
                  //Iterate Row
                  ObservableList&lt;String&gt; row = FXCollections.observableArrayList();
                  for(int i=1 ; i&lt;=rs.getMetaData().getColumnCount(); i++){
                      //Iterate Column
                      row.add(rs.getString(i));
                  }
                  System.out.println("Row [1] added "+row );
                  data.add(row);
  
              }
  
              //FINALLY ADDED TO TableView
              tableview.setItems(data);
            }catch(Exception e){
                e.printStackTrace();
                System.out.println("Error on Building Data");             
            }
  </code></pre>
  
  <p>Image for : The Vertical scroll bar on TableView is not Visible</p>
  
  <p><img src="https://i.stack.imgur.com/tt6uU.jpg" alt="The Vertical scroll bar on TableView is not Visible"></p>
  
  <p>and then, i try this to put the TableView into a ScrollPane, but the header is also moving when I’m scrolling data vertically. I mean, the header didn’t stay in that position.
  I used this code:</p>
  
  <pre><code>ScrollPane scrollpane1 = new ScrollPane(); 
  scrollpane1.setContent(tableview);
  </code></pre>
  
  <p>Image for : The Header is also moving when I scrolled vertically</p>
  
  <p><img src="https://i.stack.imgur.com/VydN3.jpg" alt="The Header is also moving when I scrolled vertically"></p>
  
  <p><strong>Is there any way to make the first row (Header) stay in that position when I am scrolling vertically?</strong></p>