如何在griffon中使用我自己的swing类的子类

如何在griffon中使用我自己的swing类的子类,swing,groovy,jtable,griffon,Swing,Groovy,Jtable,Griffon,我需要使用我自己的JTable子类,但不确定如何在视图中使用它,无论如何都找不到它 我必须使用什么来代替此处的表格: scrollPane (constraints: "growx, growy, gapy 0:0:0, gapx 0:0:0") { table(id: 'thesublcass') { tableFormat = defaultTableFormat(columns: model.columns)

我需要使用我自己的JTable子类,但不确定如何在视图中使用它,无论如何都找不到它

我必须使用什么来代替此处的表格:

scrollPane (constraints: "growx, growy, gapy 0:0:0, gapx 0:0:0") {
                table(id: 'thesublcass') {
                    tableFormat = defaultTableFormat(columns: model.columns)
                    ...
                }
}
编辑:这非常有效,谢谢

表(新的YourClass())


您应该能够使用
小部件
,如本页底部所示:

即:


谢谢我试过了,但是我得到了“java.lang.RuntimeException:”widget“不支持嵌套”。…有没有办法在widget()中包含tableFormat设置等?你可以创建一个类的实例,设置它,然后将此实例传递给
小部件
,如上所述
小部件
不支持嵌套,但
容器
支持嵌套,如中所述。您还可以使用
table(newyourclass())
,只要YourClass是JTable的子类。
            widget( new YourClass(), id: 'thesublcass') {
                tableFormat = defaultTableFormat(columns: model.columns)
                ...
            }