JTable column spanning

前端 未结 3 1701
攒了一身酷
攒了一身酷 2021-01-18 07:10

I am trying to make a JTable that has column spans available. Specifically, I am looking to nest a JTable inside another JTable, and w

3条回答
  •  时光说笑
    2021-01-18 07:38

    You need to write your own TableUI for the master table. It can also helpful to use your own TableModel to save additional data like if a row is expanded. But this is optional.

    I write an equals TableUI that expand a row and show an text editor. In the TableUI you need to change the the row hight dynamically with table.setRowHeight(height). Also it is necessary to copy some stuff from the BaseTableUI because you can not access the private stuff.

提交回复
热议问题