View Single Post
Old Feb 28, 2009 | 03:11 AM
  #13  
boy_in_blue_x's Avatar
boy_in_blue_x
Wahay!! I've lost my Virginity!!
 
Joined: Sep 2007
Posts: 95
Likes: 0
From: Kent
Default

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 })
}
}
Reply