I wrote my first console app in Scala, and I wrote my first Swing app in Scala — in case of the latter, the entry point is top method in my object extending SimpleSwingApplication.
However I would like to still go through main method, and from there call top — or perform other equivalent actions (like creating a window and “running” it).
How to do it?
Just in case if you are curious why, the GUI is optional, so I would like to parse the command line arguments and then decide to show (or not) the app window.
If you have something like:
You can just call
MySimpleApp.mainto start it from the console. Amainmethod is added when you mixSimpleSwingApplicationtrait. Have a look at the scaladoc.