Rob Thornton have posted an article on InfoQ talking about the future of Swing. It can be read here and it’s a recommended read for all Java programmers that feel the pain of creating Java user interfaces.
My personal take on the problem is that Swing may well be worth saving, but no programmer building a user interface should ever have to face Swing code correctly. It seems the correct way forward is a declarative UI domain specific language, that will translate into Swing operations on a lower level. If that DSL is done right it seems there wouldn’t be anything stopping a framework agnostic UI builder, that could be used for both Swing, SWT and maybe others.
If that DSL would be Ruby or Python, or possibly JavaScript, it would mean it would be possible to have backends that actually generate correct UI code for both Java and .NET, and maybe also for other GUI’s. Groovy would also work fine, except it will tie the DSL to the Java platform.
