title: IntelliJ Scala Swing - cannot resolve symbol 'swing'
body: <p>I have been trying to make a project properly in IntelliJ with Scala using Swing. But I can not get IntelliJ understand where Swing is. When taking my code and compiling through command line like:</p>
  
  <pre><code>$ scalac test.scala
  $ scala test
  </code></pre>
  
  <p>it works just fine.</p>
  
  <p>When in IntelliJ I get bunch of errors , due to Swing.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import scala.swing._
  object test extends SimpleSwingApplication {
    def top = new MainFrame {
      title = "First Swing App"
      contents = new Button {
        text = "Click me"
      }
    }
  }
  </code></pre>
  
  <p>The error in the first line is : Cannot resolve symbol <strong>swing</strong>.</p>
  
  <p>I searched everywhere and can not find a solution.</p>