summaryrefslogtreecommitdiff
path: root/src/swing
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-23 00:27:39 +0000
committerPaul Phillips <paulp@improving.org>2010-02-23 00:27:39 +0000
commitdf94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5 (patch)
tree6be1d68b93045d6a568ac165126d4ed8e11e3fd7 /src/swing
parent8d74992310fe60a1da32606949c96531691754e9 (diff)
downloadscala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.tar.gz
scala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.tar.bz2
scala-df94b3c5b831e78a056f7b0b5334b1fb8d3c3bd5.zip
Some much needed housecleaning regarding system...
Some much needed housecleaning regarding system properties. If you can possibly resist the temptation, it'd be great if people could try to go through the properties classes to get and set them, and also to set property values somewhere fixed rather than using strings directly. Review by community.
Diffstat (limited to 'src/swing')
-rw-r--r--src/swing/scala/swing/SimpleGUIApplication.scala2
-rw-r--r--src/swing/scala/swing/SimpleSwingApplication.scala2
-rw-r--r--src/swing/scala/swing/test/SimpleApplet.scala3
3 files changed, 3 insertions, 4 deletions
diff --git a/src/swing/scala/swing/SimpleGUIApplication.scala b/src/swing/scala/swing/SimpleGUIApplication.scala
index c09fdfb246..79eb3cd2b4 100644
--- a/src/swing/scala/swing/SimpleGUIApplication.scala
+++ b/src/swing/scala/swing/SimpleGUIApplication.scala
@@ -44,5 +44,5 @@ import javax.swing._
this.getClass.getResource(path)
def resourceFromUserDirectory(path: String): java.io.File =
- new java.io.File(System.getProperty("user.dir"), path)
+ new java.io.File(util.Properties.userDir, path)
}
diff --git a/src/swing/scala/swing/SimpleSwingApplication.scala b/src/swing/scala/swing/SimpleSwingApplication.scala
index 9f66cc5be5..6a4d7e8775 100644
--- a/src/swing/scala/swing/SimpleSwingApplication.scala
+++ b/src/swing/scala/swing/SimpleSwingApplication.scala
@@ -13,5 +13,5 @@ abstract class SimpleSwingApplication extends SwingApplication {
this.getClass.getResource(path)
def resourceFromUserDirectory(path: String): java.io.File =
- new java.io.File(System.getProperty("user.dir"), path)
+ new java.io.File(util.Properties.userDir, path)
}
diff --git a/src/swing/scala/swing/test/SimpleApplet.scala b/src/swing/scala/swing/test/SimpleApplet.scala
index 090f4cde8d..d5f17f8a40 100644
--- a/src/swing/scala/swing/test/SimpleApplet.scala
+++ b/src/swing/scala/swing/test/SimpleApplet.scala
@@ -7,8 +7,7 @@ class SimpleApplet extends Applet {
object ui extends UI with Reactor {
def init() = {
val button = new Button("Press here!")
- val text = new TextArea("Java Version: " +
- System.getProperty("java.version")+"\n")
+ val text = new TextArea("Java Version: " + util.Properties.javaVersion + "\n")
listenTo(button)
reactions += {
case ButtonClicked(_) => text.text += "Button Pressed!\n"