What part of JScrollPane code is responsible for displaying the column headers of JTable?
If you just add a JTable to a JPanel, it won't show the headers by default. You should either pass the table to JScrollPane's constructor or call JScrollPane setViewportView with the table as the argument. So actually, what makes the column headers visible? Is it part of the internal rendering of the JScrollPane (updateUI and getUI methods)?
Initially I thought JScrollPane uses its setColumnHeaderView to accomplish this, but it doesn't (pass null to this method, the table will still display the headers).