I want to set the JTable header's font. Do you know how?
How can I change the font of a JTable's header?
Asked Answered
This should work:
table.getTableHeader().setFont(new Font("SansSerif", Font.ITALIC, 12));
JTableHeader header = table.getTableHeader();
header.setFont(new Font("Dialog", Font.BOLD, 18));
you can also use this to set all table's header's font :
UIManager.put("TableHeader.font", font1);
This work for me
tableName.getTableHeader().setFont(new Font("Segoe UI", 1 , 16));
© 2022 - 2024 — McMap. All rights reserved.