title: How to know if a scroll bar is visible on a JavaFx TableView
body: <p>Is there a way to know if a scroll bar is present on a table view? (Other than what I did in my code below)
  My goal is to position 2 arrow images (to close/open a side panel) on the right side of a table (over the table.). But I don't want to put them over the scroll bar.
  The table content is a result of a search, so sometime the scroll bar is visible and other time it is not. If there is not enough items.
  I want the position of my arrows to change every time the tableview items change.</p>
  
  <p>I already try the following solution, but the result is that the arrows are moved the second time I do the search. Looks like a concurrency problem. Like if my listener code is executed before the table is rendered.</p>
  
  <p>Is there a way to solve that?</p>
  
  <pre><code>tableView.getItems().addListener( (ListChangeListener&lt;LogData&gt;) c -&gt; {    
  // Check if scroll bar is visible on the table
  // And if yes, move the arrow images to not be over the scroll bar
  Double lScrollBarWidth = null;
  Set&lt;Node&gt; nodes = tableView.lookupAll( ".scroll-bar" );
  for ( final Node node : nodes )
  {
      if ( node instanceof ScrollBar )
      {
          ScrollBar sb = (ScrollBar) node;
          if ( sb.getOrientation() == Orientation.VERTICAL )
          {
              LOGGER.debug( "Scroll bar visible : {}", sb.isVisible() );
              if ( sb.isVisible() )
              {
                  lScrollBarWidth = sb.getWidth();
              }
          }
      }
  }
  
  if ( lLogDataList.size() &gt; 0 &amp;&amp; lScrollBarWidth != null )
  {
      LOGGER.debug( "Must move the arrows images" );
      tableViewController.setArrowsDistanceFromRightTo( lScrollBarWidth );
  }
  else
  {
      tableViewController.setArrowsDistanceFromRightTo( 0d );
  }} );
  </code></pre>