In
So how do you add a And what is this method of non-declaring buttons called, rather than specifically declaring Button ? Is it "anonymously"? Thanks |
In
simpleSwingApplication
, I notice that you can create a button without a name in an initialize context, e.g.:import scala.swing._ object SimpleSwingApp extends SimpleSwingApplication { override def main(args: Array[String]) = super.main(args) // top is a required method def top = new MainFrame { println("Starting") title = "First Swing App" contents = new Button { text = "Click this" } } }
So how do you add a
listenTo
routine in the context above (i.e. without a name) so it does something when you click the button?
And what is this method of non-declaring buttons called, rather than specifically declaring Button ? Is it "anonymously"?
--
Thanks
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.