Footer row in a JTable

前端 未结 8 1504
感动是毒
感动是毒 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:50

    Here is another solution mentioned in the java bug database

    A solution that works for me is painting a border for the viewport (your JTable must be inside a JScrollPane) ....

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题