All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scala.swing.test.SimpleApplet.scala Maven / Gradle / Ivy

There is a newer version: 2.11.0-M7
Show newest version
package scala.swing
package test

import event._

class SimpleApplet extends Applet {
  object ui extends UI with Reactor {
    def init() = {
      val button = new Button("Press here!")
      val text = new TextArea("Java Version: " + util.Properties.javaVersion + "\n")
      listenTo(button)
      reactions += {
        case ButtonClicked(_) => text.text += "Button Pressed!\n"
        case _ =>
      }
      contents = new BoxPanel(Orientation.Vertical) { contents.append(button, text) }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy