title: From JavaFX 2.2 to JavaFX8
body: <p>I have made an application using JavaFX 2.2 and want to switch to JavaFX 8. Using JavaFX2.2 my application looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Tz6vv.png" alt="JavaFX 2.2 "></p>
  
  <p>When using JavaFX 8 without changing any source code it looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/PPxMP.png" alt="JavaFX8"></p>
  
  <p>With JavaFX8 some nodes are not shown at all (e.g. Criterion 1) and sometimes appear after clicking randomly on the scrollpane. In addition the nodes have an incorrect size (compare Step 1 and the small little dot). Another problem is that when performing actions such as adding nodes the application lags heavily in JavaFX8.</p>
  
  <p>Unfortunately I do not get any error messages at all and I have almost no clue what I have to fix in order to get the application working in JavaFX8. Any help/ideas/hints would be greatly appreciated.</p>
  
  <p>Possible issues (?):</p>
  
  <ul>
  <li>I have used Platform.runLater() very often in my application. Has this perhaps changed in JavaFX 8?</li>
  <li>in JavaFX2.2 the size of a node (e.g. stackpane containing text) was automatically computed after adding it to the scroll pane. Let's say I add a node with position x and y. Only after JavaFX has drawn it I can get its height and width (boundsInParent.getHeight()). This is also the reason why I often used Platform.runLater() in order to layout the nodes. Has this behaviour changed in JavaFX 8?</li>
  </ul>
  
  <p>EDIT: The "bug" is connected with css styling. If I remove the stylesheets that are added to the nodes everything works fine (except the styling of the nodes of course). In particular the commands I have to remove are of the following form: </p>
  
  <p>getStylesheets().add(ClassName.class.getResource("CSSFile.css").toExternalForm());</p>