What I want is to make the background of a uneditable text area the same as its disabled background.
I know that the color is available from the UIManager
with the key TextArea.disabled
:
DerivedColor(color=214,217,223 parent=control offsets=0.0,0.0,0.0,0 pColor=214,217,223
I firstly tried:
textArea.setBackground(UIManager.getColor("TextArea.disabled"));
It changed nothing at all and the background was still white.
Then I tried:
textArea.setBackground(new Color(UIManager.getColor("TextArea.disabled").getRGB()));
The background did change but was not exactly the same as the disabled background which looks brighter.
What is the correct way to deal with this derived color?