> On Nov 24, 2016, at 7:18 AM, Semyon Sadetsky <semyon.sadet...@oracle.com> 
> wrote:
> 
>> If someone(in the application) change the background to transparent color 
>> then it should change opaque state as well. 
> Can you prove this statement at least with a reference to spec? It seems 
> JComponent does not imply this.

The spec could be clearer with regard to painting a translucent color, but the 
implication is clear from the term “show through”. Painting a translucent color 
allows the pixels underneath to show through, so the components that provided 
those pixels must be repainted.


public boolean isOpaque()
Returns true if this component is completely opaque.
An opaque component paints every pixel within its rectangular bounds. A 
non-opaque component paints only a subset of its pixels or none at all, 
allowing the pixels underneath it to "show through". Therefore, a component 
that does not fully paint its pixels provides a degree of transparency.


Reply via email to