title: Embed a JavaFX application in a HTML webpage
body: <p>I'd like to embed one ore more JavaFX applications on a webpage. How do you do that?</p>
  
  <p>There are several bits and pieces on the Oracle website, but there's no <strong>complete</strong> example.</p>
  
  <p>There's the <a href="http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm" rel="noreferrer">Deployment in the Browser</a> tutorial, the <a href="http://docs.oracle.com/javafx/2/deployment/packaging.htm" rel="noreferrer">Packaging Basics</a> tutorial, etc. There's mentioning of Ant tasks and what not.</p>
  
  <p>So there were still a lot of questions after I read them. Like do I need Ant? Do I need to create an applet? etc</p>
  
  <p>All I'd like to see is a minimal and complete "Hello World" example in order to see how it works. Even here on StackOverflow are only bits and pieces to answers of the same question, so that don't really help.</p>
  
  <p><em>I had this question up yesterday, but deleted it and thought I'd try myself. Turned out that it is only easy when you know the pitfalls. So since this was already asked here I thought I'd share my minimal and complete example in the answer.</em></p>
  
  <p><em>Using the JavaFX samples it took only a few minutes to create the code for this html page:</em></p>
  
  <p><img src="https://i.stack.imgur.com/o6P7Y.png" alt="enter image description here"></p>