Swingbuilder is a DSL that makes constructing Swing interfaces much easier to use than when using them in Java
Example
This example script creates a frame with a scrolling textarea and a button.
import java.awt.*
import groovy.swing.SwingBuilder
import java.awt.BorderLayout
def BL = new BorderLayout()
def swing = new SwingBuilder()
frame = swing.frame(title:'Frame', size:[300,300], layout:new BorderLayout()) {
scrollPane(constraints:BL.CENTER){
textArea()
}
panel(constraints:BL.SOUTH){
button(text:"Hello", actionPerformed:{println "Hello"})
}
}
frame.show()