Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
None
-
Patch
Description
When using the tableModel() element in the swingBuilder and using the groovy.model.DefaultTableModel the ColumnModel on the JTable is not being set by the SwingBuilder. The end result is that things suhc as the preferred size of the columna re not being reflected into the column model being used by the JTable.
For example:
<code>
import groovy.swing.SwingBuilder
import javax.swing.WindowConstants as WC
data = [\
[nick:'MrG', full:'Guillaume Laforge'],\
[nick:'jez', full:'Jeremy Rayner']\
]
swing = new SwingBuilder()
frame = swing.frame(title:'Table Demo', defaultCloseOperation:WC.EXIT_ON_CLOSE, size:[300,150] ) {
scrollPane {
table() {
tableModel( list:data )
}
}
}
frame.show();
</code>