How do I add a header to the table defined below?
import groovy.swing.SwingBuilder
data = [[first:'qwer', last:'asdf'],
[first:'zxcv', last:'tyui'],
[first:'ghjk', last:'bnm']]
swing = new SwingBuilder()
frame = swing.frame(title:'table test'){
table {
tableModel( list : data ) {
propertyColumn(header:'First Name', propertyName:'first')
propertyColumn(header:'last Name', propertyName:'last')
}
}
}
frame.pack()
frame.show()