// // GUI version of "hello world" program, plus a button // import scala.swing._ val frame = new MainFrame { val helloLabel = new Label("Hello World") val button = Button("press me") ( println("button pressed") ) title = "Hello!" contents = new BorderPanel { layout += (helloLabel -> BorderPanel.Position.Center) layout += (button -> BorderPanel.Position.South) } size = new Dimension(400,200) } frame.visible = true