all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,29 @@
import scala.swing._
import scala.swing.event._
import scala.swing.Swing._
object SimpleApp extends SimpleSwingApplication {
def top = new MainFrame {
var nClicks = 0
val button = new Button {
text = "click me"
}
val label = new Label {
text = "There have been no clicks yet"
}
contents = new BorderPanel {
layout(button) = BorderPanel.Position.South
layout(label) = BorderPanel.Position.Center
}
preferredSize = ((300, 200): Dimension)
listenTo(button)
reactions += {
case ButtonClicked(_) =>
nClicks += 1
label.text = "There have been %d clicks" format nClicks
}
}
}