1

我有一个List对象ProfileProfile有一个ListofUser作为其字段,我选择使用JTreeTablein显示此信息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可以提供更灵活的功能。

4

0 回答 0