title: How do you create a ScrollBar using FXML in javafx2?
body: <p><strong>EDIT</strong>
  I was looking for a "ScrollPane" not a ScrollBar.  </p>
  
  <pre><code>&lt;ScrollPane  fitToWidth="true" fx:id="sasd"&gt;
  &lt;content&gt;
      &lt;VBox prefWidth="200" alignment="center" fx:id="Left"&gt;
          &lt;children&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
  </code></pre>
  
  <p>Everything works just fine.</p>
  
  <p>
      
          
              
                   
                   
                   
                   
                   
                   
                   
                   
              
          
          
        </p>
  
  <p>I have a VBox that I want to add MANY Labels to.. I would like the VBox to have the ability to "scroll" as these lines are added.</p>
  
  <p>Right now this is what my FXML looks like.  Its in a BorderPane.. However I have omitted the irrelevant portions.</p>
  
  <pre><code>&lt;left&gt;
      &lt;VBox prefWidth="200" alignment="center" fx:id="Left"&gt;
          &lt;children&gt;
              &lt;ScrollBar orientation="VERTICAL" fx:id="sasd"&gt;
                &lt;children&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x121 y13 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x10 y113 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x121 y13 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x10 y113 z23"/&gt;
               &lt;Label alignment="center" fx:id="gcProgramLine" text="g0x100 y123 z23"/&gt;
               &lt;/children&gt;
               &lt;/ScrollBar&gt;
          &lt;/children&gt;
      &lt;/VBox&gt;
  </code></pre>
  
  <p>However this gives me error and compile and will not work.  I have tried to remove children as well.  No luck..  Any thoughts?  I find it hard to find the "FXML" way to do things in Javafx 2.0.  Using code is pretty easy... </p>