src/Pure/library.scala
changeset 47868 395b7277ed76
parent 47594 54ea872b60ea
child 48738 dd9cbe708e6b
     1.1 --- a/src/Pure/library.scala	Sat Mar 17 17:36:10 2012 +0100
     1.2 +++ b/src/Pure/library.scala	Sat Mar 17 17:44:29 2012 +0100
     1.3 @@ -130,8 +130,8 @@
     1.4  
     1.5    /* simple dialogs */
     1.6  
     1.7 -  private def simple_dialog(kind: Int, default_title: String)
     1.8 -    (parent: Component, title: String, message: Any*)
     1.9 +  private def simple_dialog(kind: Int, default_title: String,
    1.10 +    parent: Component, title: String, message: Seq[Any])
    1.11    {
    1.12      Swing_Thread.now {
    1.13        val java_message = message map { case x: scala.swing.Component => x.peer case x => x }
    1.14 @@ -141,9 +141,14 @@
    1.15      }
    1.16    }
    1.17  
    1.18 -  def dialog = simple_dialog(JOptionPane.PLAIN_MESSAGE, null) _
    1.19 -  def warning_dialog = simple_dialog(JOptionPane.WARNING_MESSAGE, "Warning") _
    1.20 -  def error_dialog = simple_dialog(JOptionPane.ERROR_MESSAGE, "Error") _
    1.21 +  def dialog(parent: Component, title: String, message: Any*) =
    1.22 +    simple_dialog(JOptionPane.PLAIN_MESSAGE, null, parent, title, message)
    1.23 +
    1.24 +  def warning_dialog(parent: Component, title: String, message: Any*) =
    1.25 +    simple_dialog(JOptionPane.WARNING_MESSAGE, "Warning", parent, title, message)
    1.26 +
    1.27 +  def error_dialog(parent: Component, title: String, message: Any*) =
    1.28 +    simple_dialog(JOptionPane.ERROR_MESSAGE, "Error", parent, title, message)
    1.29  
    1.30    def confirm_dialog(parent: Component, title: String, option_type: Int, message: Any*): Int =
    1.31      Swing_Thread.now {