0

Why are my table(2) rows are all the same color? How can I make it grey row white row like in the table marked 1?

2 is my table 1 is table on the internet

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • 2
    The Nimbus look and feel will do this by default, otherwise you'll have to roll your own solution, for [example](https://stackoverflow.com/questions/25279727/java-abstracttablemodel-2-different-color-for-each-row/25279954#25279954) – MadProgrammer Dec 27 '21 at 05:15
  • Some relevant answers [here on SO](https://stackoverflow.com/q/17762214/243373) – TT. Dec 27 '21 at 08:24
  • Try Googling for ___jtable alternating row colors___ – Abra Dec 27 '21 at 19:02

1 Answers1

0

It turns out it was because I was running NetBeans on dark mode. When I switched to light mode it works just fine.

TT.
  • 15,774
  • 6
  • 47
  • 88