I have a JTable for which I have provided a custom TableCellRenderer that colors numeric cells in red/gray/green depending on their value (<0, 0, >0).
However, when I use the Nimbus L&F, the label.setForeground() method is ignored: when calling label.getForeground() I can see that the number has the right color, for example red, but on the screen it comes black. If I remove the L&F it works fine.
Is there a way to gently ask the L&F to accept using my color for that cell?
ps: I know that the javadoc of setForeground() is clear about the fact that the L&F might ignore the call, so I’m looking for a workaround.
think are complicated by using
JLabel,if you’ll use
Componentsthen there no needed to overrideNimbusDefaultsorPainter,sorry I have no ideas to playing with
Nimbus&NimbusDefaults&Renderer, because I have another favorite L&F please read some more info about Look and Feels(without override NimbusDefaults from JCheckBox, this issue are solved a few times on this forum)