title: How to get JavaFX HBoxes to move items to the next line?
body: <p>I'm trying to show a HBox which contains a list of checkboxes. Example:</p>
  
  <pre><code>HBox container = new HBox();
  for (Weekday day: Weekday.values() )
  {
     container.getChildren().add( new CheckBox( day.getName() ) ); 
  }
  </code></pre>
  
  <p>However this shows the days all on one line, as:</p>
  
  <pre><code>Sunday Monday Tuesday Wednesday Thursday Friday Saturday
  </code></pre>
  
  <p>The window is not big enough to show them all on one line, and so I get a horizontal scrollbar. What I need is to show the days on two lines, e.g:</p>
  
  <pre><code>Sunday Monday Tuesday Wednesday
  Thursday Friday Saturday
  </code></pre>
  
  <p>I've tried <code>container.setPrefWidth()</code> but it just causes it to show <code>Su.., Mo..</code> to truncate the text rather than moving them to the next line.</p>