Alexander Gromnitsky Alexander Gromnitsky - 1 year ago 156
Scala Question

GUI in Scala/Groovy/Clojure

Last time I had to deal with Java was 2005 and I forgot almost everything about it since then.

Today I need to build a GUI app on the top of Java. I guess it is better to use one of Scala/Groovy/Clojure languages.

The question is: which of them is better for desktop GUI programming? My program will transform and display a series of jpeg/png files + there will be ~10 dialogs (with tons of options in each with all possible widgets).

The main requirement is compactness: I hate to write a dozen lines of code only to draw a simple frame with a button. My background in GUI is (mostly) Tcl/Tk and GTK+.

Answer Source

Scala comes with fairly complete sample applications for basic GUI elements, which you can run by typing scala scala.swing.test.UIDemo at the command line. You can browse the source code for them here.

You may also look at this document to get an idea of the design principles behind Scala's Swing wrappers.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download