Issue
I've tried:
table.getTableHeader().setBackground(Color.BLACK);
Doesn't work.
EDIT: This code doesn't work in my project only. Works in other projects. I may have changed a property that stops the color from changing. Or maybe NetBeans has some property which keeps the default colors. I've noticed something else. The color of the header in my project is shining in a different way. In the examples where the color change works, I see different graphics.
EDIT 2: Something else. I noticed that the buttons won't change color either. Must be something generic. Hope this helps. Unfortunately SSCCE won't work in this case, because I can't recreate the problem. I am surely using the right component names.
Solution
Solved it. In NetBeans:
- Right click on project's name
- Properties
- Application - Desktop App
- Look and Feel: choose 'Java Default' (didn't work with System Default)
- Remember to Clean And Rebuild before running project
Also the graphics of the whole project changed appearance.
Answered By - Stefanos Kargas
Answer Checked By - Marie Seifert (JavaFixing Admin)