A community user in the Oracle forum posted this short snippet in hiding a TableView column header regardless if your table still does not have any data.

The listener will handle the hiding of the header column once it gets triggered.

Sure. Setting a JTable column header’s background color is very easy. Just call

But once you run it, there may be times you will not see any changes. I am not sure if this happens all the time but this surely did happen to me and it took me a very, very long time to figure out how to make this work.

All it took was one method call.

Do that, and your background color should now appear.

Related Posts Plugin for WordPress, Blogger...