I start to learn Scala and I confused. Can I create GUI without "extends SimpleSwingApplication" or "SimpleGUIApplication" or may be something yet? I try to do it so:
import scala.swing._
object Main {
def main(args:Array[String]): Unit = {
val frame = new Frame {title = "test GUI"}
val button = new Button {text = "test button"}
val uslPanel = new BoxPanel(Orientation.Vertical) {
contents += button
}
//listenTo(button)
frame.contents_=(uslPanel)
frame.visible_=(true)
}
}
It works, but if only "listenTo(botton)" is commented. How can I use "listenTo(...)" without "extends SimpleGui... etc".