I have a group of radio buttons in my Swing application that have a border built around them as follows:
radioButtonPanel.setBorder( new CompoundBorder (
BorderFactory.createTitledBorder( " Input Data " ), padBorder ) );
Our application supports two look and feels, a light and a dark one. When switching between the two, the border color itself appears to change colors correctly, but the text does not. For the life of me, I can't figure out what the name of the component is I should be setting the color of. The documentation for createTitledBorder()
says it uses the default look and feel, but I'm unsure where it's pulling its default. I thought it was the Panel.foreground
, but that's not it and nothing else seems to look quite right.
Does anybody know which look and feel component I need to be setting here?