我有一个List
对象Profile
。Profile
有一个List
ofUser
作为其字段,我选择使用JTreeTable
in显示此信息SwingX
。
我有一个问题,getColumnClass(int column)
因为此方法无法区分节点是父节点还是子节点。简而言之,我想要这样的东西:
//getColumnClass as I expect it
@Override
public Class<?> getColumnClass(Object node, int column) {
if (node instanceof Profile) {
switch (column) {ecc.....}
}
else {.....}
}
谁能告诉我如何解决这个问题。因为我切换到SwingX
是因为我认为 aJTreeTable
可以提供更灵活的功能。