How can I put a control in the JTableHeader of a JTable?
问题 Given a JTable with a column of type Boolean.class , the default renderer is a JCheckBox . It\'s easy enough to select individual cells based on a user selection, but it may be convenient to select all or none of the check boxes, too. These recent examples mentioned using JCheckBox in the table header, but the implementation was awkward and unappealing. If I don\'t need to sort the column, how can I put a well-behaved control in the JTableHeader? Addendum: For convenience, I\'ve added my