A class to select displayed columns in a Swing JTable
The idea is to have a context menu on the table header so that the user can select which columns to display. That is, without affecting the table model at all.
As it is now, it's usable but could use much more work. It doesn't handle model change or structural changes within the model, for example. But it works. It is intended to be used as an illustration to this short TDD tutorial:
Part1: http://www.tachenov.name/2016/hide-and-show-jtable-columns/
Part2: http://www.tachenov.name/2016/hide-and-show-jtable-columns-pt-2/
A very similar work can be found here:
https://tips4java.wordpress.com/2011/05/08/table-column-manager/