title: Why setting the preferred size to Double.POSITIVE_INFINITY or Double.MAX_VALUE does not work in JavaFX while 10000 does?
body: <p>For some weird reason, if I try to set the height of a <code>HBox</code> with</p>
  
  <pre><code>setPrefHeight(10000)
  </code></pre>
  
  <p>it works wonders (it attempts to fill as much space as physically possible), while attempting any of the following (more obvious) options makes the layout go crazy:</p>
  
  <pre><code>setPrefHeight(Double.POSITIVE_INFINITY);
  setPrefHeight(Double.MAX_VALUE);
  </code></pre>
  
  <p>I've also tried to play around with the <code>setMaxHeight()</code> but it didn't seem to be much of a help (the results ended up being the very same). This is not a <code>HBox</code> specific behavior, as I've seen it happening with other kinds of controls too.</p>
  
  <p>What's happening here?</p>