Search code examples
javaswingjtablejtableheader

Customizing JTable


Good Day.

If the JLabel and JTextField font size can be changed as desired, is it possible to change also the font style (size, face, color) of the column names and elements of a JTable?

Adding more, I'm using the Look and feel of Windows.

Thanks,


Solution

  • BasicTableHeaderUI has defaults for TableHeader.font, as well as TableHeader.background and TableHeader.foreground. You can use UIManager.put() with the TableHeader.font key to override the default.