Override the UIManager value for a single object

Can I override the UIManager properties for specific objects?

For example, my user interface manager has

 [Label.background] => (ColorUIResource) [javax.swing.plaf.ColorUIResource[r=238,g=238,b=238]] 

I want to make ONE JLabel with a Color.WHITE background.

 whiteJLabel.setBackground(Color.WHITE) 

.. has no effect.

+4
source share
1 answer
 whiteJLabel.setBackground(Color.WHITE) whiteJLabel.setOpaque(true); 
+6
source

All Articles