Passing an anonymous function to SwingUtilities.invokeLater (in Scala)