title: JavaFX WebView in Java Swing Project
body: <p>i try to use the WebView in my java project, in my code is:</p>
  
  <pre><code>JFXPanel fxPanel = new JFXPanel();
  fxPanel.setBounds(10, 48, 439, 362);
  desktopPane.add(fxPanel);
  
  WebView webView = new WebView();
  fxPanel.setScene(new Scene(webView));
  webView.getEngine().load("http://www.stackoverflow.com/");
  </code></pre>
  
  <p>but the this thown a exception</p>
  
  <pre><code>java.lang.IllegalStateException: Not on FX application thread; currentThread = main
  </code></pre>
  
  <p>And yes, this is not a JavaFx application.</p>