Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Clojure Desktop Applications with Swing (atomicobject.com)
82 points by micahalles on Dec 14, 2011 | hide | past | favorite | 20 comments


I spent a couple years on a Java Swing project and hated every minute. Karsten Lentzsch provided the only saving grace with the JGoodies libraries and seesaw supports the JGoodies Forms.

I just started writing some Clojure in my free time and I hadn't looked into GUI toolkits yet, but this definitely provides a great jump start. Bringing enlive's selector style to Swing widgets will make life livable again.


One should add MigLayout to the list of painkillers

http://www.miglayout.com/


I think if you have to work with Swing, you definitely have to go with the Netbeans Swing GUI Builder. I have worked in some Swing projects and it has been a joy to use. It comes out of the box with the IDE.


Among other things, Seesaw 1.3 will hopefully have friendlier support for pulling in UIs laid out with UI builders (NetBeans, the Google one in Eclipse, etc).


If you want to get a feel for the Seesaw API, I recently wrote an interactive tutorial: https://gist.github.com/1441520


I walked through it last weekend. Very good tutorial. Seesaw will definitely take much of the pain out of swing development.


There was another article on HN recently featuring Clarity (not seesaw)

http://skillsmatter.com/podcast/scala/lightening-talk-clarit...

Edit- Found the HN discussion - http://news.ycombinator.com/item?id=3303352


I cringe every time I have to make a Swing GUI for Java projects at my uni. It might just be me, but I can never get them to look half decent.


The Nimbus theme does not look so bad, otherwise you can still set the native theme. http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/n...

I wrote an article last year on how to design the dialogs with Netbeans and write the code with Clojure: http://inclojurewetrust.blogspot.com/2010/11/how-to-build-gu...


The "native theme" still looks poor and out of place.


With some custom code and the help of libraries like MacWidgets, you can make some decent native-looking GUI's with Swing. See my profile for an example of one - it's a large-scale desktop application.

I concede though that if you go with out of the box LNF's, even Nimbus, your results will not be up to par.


Why not wrap Clojure on top of SWT? The native look and feel would look better. And if the interactive and incremental nature of Clojure can be weaved in, it would be fantastic for UI development.


GUIFTW wraps SWT and Swing for Clojure.

https://github.com/santamon/GUIFTW


If you're using JRuby you need to check out Monkeybars: http://monkeybars.org.

I'm the project owner and I need to see what ideas Seesaw might have to steal.


I hope you find something useful. When I started Seesaw, I spent some time studying Monkeybars for ideas to steal. :)


Oh good! Closure's been on my To Learn periphery, and I wondered if Monkeybars could be adapted for it, or if the general ideas (e.g. decoupling concerns; using dynamic look-up to drive compiled GUI classes so a WYSIWYG editor can be used) could be employed.


Clojure's wonderful. Give it a try if you get a chance. :)


I've been hinting to the wife that for Christmas I want an extra 4 hours every day to get stuff done. :)


Ha! Good luck with that. If I tried that, I'd probably get a divorce for Christmas :)


A bit off topic, but I've had some fun playing with Griffon - http://griffon.codehaus.org/ - Swing apps with Groovy.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: