title: Scala SBT: scala compiler version
body: <p>I know that the scala swing libraries are present in scala 2.8:</p>
  
  <pre><code>[info] Building project chart 1.0 against Scala 2.8.1
  [info]    using sbt.DefaultProject with sbt 0.7.4 and Scala 2.7.7
  </code></pre>
  
  <p>So how come I'm getting this error:</p>
  
  <pre><code>[error] /src/main/scala/Chart.scala:2: value swing is not a member of package scala
  [error] import scala.swing.Panel
  </code></pre>
  
  <p>Is it because SBT is using the wrong version of scala (i.e. 2.7.7)? If so, how do I configure it to use the correct version?</p>
  
  <p><strong>EDIT: Answer</strong></p>
  
  <p>Following <a href="https://stackoverflow.com/questions/5113152/scala-sbt-scala-compiler-version/5113504#5113504">Dylan Lacey's answer</a>, I made the following file <code>sbt/project/build/chart.scala</code>:</p>
  
  <pre><code>import sbt._
  
  class SamplesProject(info: ProjectInfo) extends DefaultProject(info)
  {
     val scalaSwing = "org.scala-lang" % "scala-swing" % "2.8.1"
  }
  </code></pre>
  
  <p>Then I ran: <code>sbt reload update</code> from the shell.</p>
  
  <p>Now things compile!</p>