I’m trying to change the header style of a table, but I don’t know if I’m doing something wrong, it seems to ignore the code or something like that. The thing is that the header stays with the default style of a table in java and only changes the color of the letter. Here is the code:
public HomeScreen() {
initComponents();
tbCoordenadas.getTableHeader().setFont(new Font("Segoe UI Black",Font.PLAIN,18));
tbCoordenadas.getTableHeader().setOpaque(true);
tbCoordenadas.getTableHeader().setBackground(Color.BLACK);
tbCoordenadas.getTableHeader().setForeground(Color.WHITE);
tbCoordinates.setRowHeight(25);
}
Looks like this:
It ends up looking like default and not as I expect. I would really appreciate the help. By the way, the table is not generated by code, but as a Java component.
I’ve even been trying to change the table for another one, but it didn’t work.
I want the result to be similar to this:
Kimlex io is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.