# HG changeset patch # User wenzelm # Date 1281214939 -7200 # Node ID 00b72526dc64efe37569f908a5bd01c7490924f7 # Parent 968844caaff9e55a910f9c50eb94535617aa1aea simple_dialog: allow scala.swing.Component as well; diff -r 968844caaff9 -r 00b72526dc64 src/Pure/library.scala --- a/src/Pure/library.scala Sat Aug 07 22:43:57 2010 +0200 +++ b/src/Pure/library.scala Sat Aug 07 23:02:19 2010 +0200 @@ -89,8 +89,9 @@ (parent: Component, title: String, message: Any*) { Swing_Thread.now { + val java_message = message map { case x: scala.swing.Component => x.peer case x => x } JOptionPane.showMessageDialog(parent, - message.toArray.asInstanceOf[Array[AnyRef]], + java_message.toArray.asInstanceOf[Array[AnyRef]], if (title == null) default_title else title, kind) } }