Footer row in a JTable

前端 未结 8 1542
感动是毒
感动是毒 2020-12-20 22:26

What is the best way to put a footer row into a JTable? Does anyone have any sample code to do this?

The only approach I\'ve thought of so far is to put a special ro

8条回答
  •  再見小時候
    2020-12-20 22:52

    I guess the best approach (but certainly not the easiest) would be to take a look at the source code for the JTableHeader Component, see how it works and then create your own JTableFooter Component. You can re-use the JTableHeader UI Delegate for the footer, I think the main differences would be in the getHeaderRect() method, where it determines the bounds of a given column header tile.

提交回复
热议问题