The question is in the title.
I'm currently doing something like:
jSperator = new JSeparator();
jSeparator1.setForeground(new java.awt.Color(255, 51, 51));
But the separator keep his default color, something like 212,212,212.
The question is in the title.
I'm currently doing something like:
jSperator = new JSeparator();
jSeparator1.setForeground(new java.awt.Color(255, 51, 51));
But the separator keep his default color, something like 212,212,212.
The JSeparator has 2 colors, one for the line, one for the shadow. You can change both, setting colors to the Background and the Foreground respectively.
JSeparator sep = new JSeparator();
sep.setForeground(Color.green); // top line color
sep.setBackground(Color.green.brighter()); // bottom line color
have to change
’Background’
instead of’Foreground’
logics could be different for
Nimbus Look and Feel
Metal L&F