Checkbox within a JXTreeTable

后端 未结 3 492
南旧
南旧 2021-01-22 21:39

Still a Java newbie here, trying to stuff far too advanced for my own good. Nevertheless, here\'s what I need done: A checkbox within a JXTreeTable. My main class:

<         


        
3条回答
  •  再見小時候
    2021-01-22 22:01

    Sturm gives most of the solution.

    The missing piece of the puzzle is that you can get the JTree from the JXTreeTable like this:

    JTree tree = (JTree) treeTable.getCellRenderer(0, treeTable.getHierarchicalColumn())
    

    It's a bit of a hack, but I don't know if they have any better API to get at it.

提交回复
热议问题