1

For some reason my header row is not visible. I am using SwingBindings.createJTableBinding to bind a pojo to the table. My table is showing all the rows however the header row is not visible.

If I inspect the JTableHeader in the table is there and its columns have names as expected. The JTable header properties: isEnabled and isVisible are set to true.

Is there something I am missing?

kleopatra
  • 51,061
  • 28
  • 99
  • 211
JeffV
  • 52,985
  • 32
  • 103
  • 124

1 Answers1

3

I don't know what SwingBindings.createJTableBinding is, but when you use Swing you add the table to a JScrollPane. The table header is then used as the column header view of the scrollpane.

If you are not using a JScrollPane, then you need to create a JPanel using a BorderLayout. The table is added to the CENTER and the table header is added to the NORTH.

camickr
  • 321,443
  • 19
  • 166
  • 288