diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-09 11:06:22 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-12-09 17:11:05 -0800 |
commit | e55510607031aaf7b8473453f83c44a26c9b97e0 (patch) | |
tree | 987d4aeeef387ed435acc64ffadfdf78e6f65bce /docs/examples/swing/CelsiusConverter.scala | |
parent | dc6dd58d9da441b591580684f3d2f38d7898e7d4 (diff) | |
download | scala-e55510607031aaf7b8473453f83c44a26c9b97e0.tar.gz scala-e55510607031aaf7b8473453f83c44a26c9b97e0.tar.bz2 scala-e55510607031aaf7b8473453f83c44a26c9b97e0.zip |
Remove docs/examples; they reside at scala/scala-dist
Diffstat (limited to 'docs/examples/swing/CelsiusConverter.scala')
-rw-r--r-- | docs/examples/swing/CelsiusConverter.scala | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/docs/examples/swing/CelsiusConverter.scala b/docs/examples/swing/CelsiusConverter.scala deleted file mode 100644 index b4a62fb366..0000000000 --- a/docs/examples/swing/CelsiusConverter.scala +++ /dev/null @@ -1,42 +0,0 @@ -package examples.swing - -import swing._ -import event._ - -/** A GUI app to convert celsius to centigrade - */ -object CelsiusConverter extends SimpleSwingApplication { - def top = new MainFrame { - title = "Convert Celsius to Fahrenheit" - val tempCelsius = new TextField - val celsiusLabel = new Label { - text = "Celsius" - border = Swing.EmptyBorder(5, 5, 5, 5) - } - val convertButton = new Button { - text = "Convert"//new javax.swing.ImageIcon("c:\\workspace\\gui\\images\\convert.gif") - //border = Border.Empty(5, 5, 5, 5) - } - val fahrenheitLabel = new Label { - text = "Fahrenheit " - border = Swing.EmptyBorder(5, 5, 5, 5) - listenTo(convertButton, tempCelsius) - - def convert() { - val c = Integer.parseInt(tempCelsius.text) - val f = c * 9 / 5 + 32 - text = "<html><font color = red>"+f+"</font> Fahrenheit</html>" - } - - reactions += { - case ButtonClicked(_) | EditDone(_) => convert() - } - } - contents = new GridPanel(2,2) { - contents.append(tempCelsius, celsiusLabel, convertButton, fahrenheitLabel) - border = Swing.EmptyBorder(10, 10, 10, 10) - } - //defaultButton = Some(convertButton) - } -} - |