got bored so had a little play (its been 2 years since ive touched any code so it may be rough and not what your after)
but this should do exactly what your after i reckon.... let me know?
import groovy.swing.SwingBuilder
import javax.swing.WindowConstants as WC
SwingBuilder.build(){
frame(title:'Example01', location:[100,100], size:[800,800],
visible:true, defaultCloseOperation:WC.EXIT_ON_CLOSE){
gridLayout(cols: 2, rows:0)
label 'First name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
label = 'Last name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
}
}