Question

I need to use my own subclass of JTable, but not sure how I would use it in the View, could not find it anywhwere.

What do I have to use instead of table here:

scrollPane (constraints: "growx, growy, gapy 0:0:0, gapx 0:0:0") {
                table(id: 'thesublcass') {
                    tableFormat = defaultTableFormat(columns: model.columns)
                    ...
                }
}

EDIT: this worked perfectly, thanks both.

table(new YourClass())

Was it helpful?

Solution

You should be able to use widget as shown towards the bottom of this page:

http://groovy.codehaus.org/SwingBuilder+with+custom+widgets+and+observer+pattern

ie:

            widget( new YourClass(), id: 'thesublcass') {
                tableFormat = defaultTableFormat(columns: model.columns)
                ...
            }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top