Jax Lapusev
Jax Lapusev

Reputation: 63

Groovy swingbuilder documentation and examples

I recently discovered for myself the groovy language and the tiny little example of using Swingbuilder on groovy's website. But I faced the great lack of documentation or examples. They're all too simple and too similar. I've been googling a lot to say that.

How would I guess to type hbox or a closure at the end or use listData in list() etc?

Why is that and can someone share some links or resources?

Upvotes: 4

Views: 2087

Answers (1)

Matias Bjarland
Matias Bjarland

Reputation: 4482

I would have to agree that the documentation is quite lacking. It seems this content got lost when the groovy site transferred from codehaus to its current location.

I've built some quite involved UIs with swingbuilder a number of years back, but I had a lot of mileage with swing and spent a lot of time tinkering and figuring things out. A search on wayback machine resulted in an archived version of the page I most often ended up referring to when working with SwingBuilder:

Archived - Alphabetical Widgets List from 2014

to clarify, that is how the SwingBuilder reference page looked when the groovy documentation still lived under the codehaus domain in 2014. This seems to have dropped off the face of the planet in the domain transfer.

The page gives you a list of all the elements (frame, panel, etc) you can create using SwingBuilder and via the links, some documentation for the elements as well.

If you are not tied to SwingBuilder, Oracle has indicated that JavaFX is the way to build UIs with java and that Swing is not developed any longer and is in general considered more or less dead in the water. There is a promising looking groovy binding for JavaFX at:

http://groovyfx.org/

and the GroovyFX bindings actually seem decently documented.

If you need to stick with SwingBuilder, a couple of links that might help:

an extract of an old groovymag article by Andres Almiray

an oracle presentation on the SwingBuilder

Upvotes: 1

Related Questions