Search code examples
javafontsjtablejtableheader

How can I change the font of a JTable's header?


I want to set the JTable header's font. Do you know how?


Solution

  • This should work:

        table.getTableHeader().setFont(new Font("SansSerif", Font.ITALIC, 12));