title: Getting started on Scala + JavaFX desktop application development
body: <p>Is there some guide or walkthrough to building a Scala + JavaFX desktop application?</p>
  
  <p>I'm having hard time finding a good source and I am using IntelliJ IDEA as the IDE.</p>
  
  <p>Even the most simplistic desktop hello world samples would help a lot, because I have little clue where to start.</p>
  
  <p><strong>Update:</strong> This is what I have now:</p>
  
  <pre><code>import javafx.application.Application
  import javafx.scene.Scene
  import javafx.scene.layout.StackPane
  import javafx.stage.Stage
  import javafx.scene.control.Label
  
  class Test extends Application {
    override def start(primaryStage: Stage) {
      primaryStage.setTitle("Sup!")
  
      val root = new StackPane
      root.getChildren.add(new Label("Hello world!"))
  
      primaryStage.setScene(new Scene(root, 300, 300))
      primaryStage.show()
    }
  }
  
  object Test {
    def main(args: Array[String]) {
      val t = new Test
      t.start(new Stage)
    }
  }
  </code></pre>
  
  <p>Running it I get:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalStateException: Not on FX
    application thread; currentThread = main</p>
  </blockquote>
  
  <p>How can I get it to display the hello world window with the label?</p>