title: Setting up processing in scala
body: <p>Hi I'm trying to setup processing with scala and I'm getting these errors inside def main</p>
  
  <blockquote>
    <p>overloaded method value add with alternatives: (x$1: java.awt.Component)java.awt.Component  (x$1: java.awt.PopupMenu)Unit cannot be applied to (Demoo.Starfield)</p>
  </blockquote>
  
  <p>How should I do the setup if this isn't the correct way?</p>
  
  <pre><code>package Demoo
  
  import processing.core._
  
  object Starfield extends PApplet {
  
    private var app:Starfield = _
  
    def main(args: Array[String]) = {
      app = new Starfield
      val frame = new javax.swing.JFrame("Starfield")
      frame.getContentPane().add(app)
      app.init
      frame.pack
      frame.setVisible(true)
    }
  }
  
  class Starfield {
  
    override def setup() = {}
  
    override def draw() = {}
  
  }
  </code></pre>