<Swing Dev> [9] Review request for 8027639: JComboBox's popup leaves tracks after closing

Alan Snyder javalists at cbfiddle.com
Thu Nov 24 15:33:18 UTC 2016


> On Nov 24, 2016, at 7:18 AM, Semyon Sadetsky <semyon.sadetsky at 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.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20161124/0c6fdf1a/attachment.html>


More information about the swing-dev mailing list