title: Where do I put my resources in Scala?
body: <p>While studying using Scala with JavaFX I have met the following code in a <a href="https://github.com/jpsacha/ProScalaFX" rel="nofollow noreferrer">ProScalaFX example</a>:</p>
  
  <pre><code>  val resource = getClass.getResource("AdoptionForm.fxml")
    if (resource == null) {
      throw new IOException("Cannot load resource: AdoptionForm.fxml")
    }
  
    ...
  
    val root: jfxs.Parent = jfxf.FXMLLoader.load(resource)
  </code></pre>
  
  <p>Where do I put the actual "AdoptionForm.fxml" content in this case? Unfortunately I am neither familiar with using resources in Java.</p>
  
  <p>I use SBT as the building system and Idea as an IDE.</p>
  
  <p>There is a <a href="https://stackoverflow.com/questions/4832751/scala-and-sbt-storing-sql-in-a-resource">related question</a> which suggests a way (putting the resource files in "src/main/resources" or "src/main/resources/packagename"), but it also says it doesn't work actually (needless to say I have tried).</p>