opaque

Sets isOpaque - required for background to actually paint.

When a style stops setting it, a button whose original flag matched contentAreaFilled goes back to following the fill. Any other button goes back to its original flag. A menu item is the exception: its flag is independent of the fill, so it always goes back to its original value.

Parameters

opaque

true promises the component paints every pixel of its bounds, letting Swing skip what is behind it; false lets the parent show through.

See also