Q:

IntelliJ Scala Swing - cannot resolve symbol 'swing'

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:
$ scalac test.scala
$ scala test

it works just fine.
When in IntelliJ I get bunch of errors , due to Swing.
Here is my code:
import scala.swing._
object test extends SimpleSwingApplication {
  def top = new MainFrame {
    title = "First Swing App"
    contents = new Button {
      text = "Click me"
    }
  }
}

The error in the first line is : Cannot resolve symbol swing.
I searched everywhere and can not find a solution.

A:

It could be that your intellij is using scala 2.11. scala.swing has been taken out of scala standard libraries in 2.11. So you have to explicitly include it in again if you want to use it.
Have a look at this
https://github.com/scala/scala-module-dependency-sample
Or you can configure intellij to use scala 2.10

