title: How to compile scala swing app?
body: <p>I'm using:</p>
  
  <pre><code>% scalac -version
  Scala compiler version 2.9.1 -- Copyright 2002-2011, LAMP/EPFL
  </code></pre>
  
  <p>on Ubuntu 12.04.</p>
  
  <p>This code is saved in HelloGui.scala:</p>
  
  <pre><code>import scala.swing._
  
  object HelloGui extends SimpleSwingApplication {
    def top = new MainFrame {
      title = "Hello World GUI"
      contents = new Button {
        text = "Click me"
      }
    }
  }
  </code></pre>
  
  <p>When I try to compile this I get:</p>
  
  <pre><code>% scalac HelloGui.scala        
  HelloGui.scala:1: error: object swing is not a member of package scala
  import scala.swing._
               ^
  one error found
  </code></pre>
  
  <p>I've tried using <code>import swing._</code> (it isn't clear from the tutorials which import path I need to use with this version of scala), and I get:</p>
  
  <pre><code>% scalac HelloGui.scala
  HelloGui.scala:1: error: not found: object swing
  import swing._
         ^
  one error found
  </code></pre>
  
  <p>When I look in /usr/share/java, I see scala-swing-2.9.1.jar and scala-swing.jar as a symlink to it, so it seems like the libraries are present?</p>
  
  <p>Am I missing a compiler flag or is there another package I need to install?</p>