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

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Thu Nov 24 18:11:14 UTC 2016


On 24.11.16 20:42, Semyon Sadetsky wrote:
>> It have a different implementations because it has different meaning:
>>  - The non-opaque window is a window which uses transparent background.
>>  - The non-opaque component is the component which require the parents
>> be painted first. it is not necessary that the background in this case
>> should be transparent(It is possible that the component draw something
>> only in some place of its bounds) And transparent color is not always
>> requires that the component should be non-opaque, because components
>> can ignore its background.
> Hmm.. Both JComponent and Window override the same Component.isOpaque()
> but the property has different meaning for each of them.

The requirements for Window.isOpaque() are a subset of 
JComponent.isOpaque(). Because the Window does not have the parents, 
which should/shouldn't be painted. And to be a transparent the Window 
must have a transparent color. Both of these cases are not applicable to 
the components.

> Probably, this is a design mistake?

This is how it was implemented long time ago.

-- 
Best regards, Sergey.



More information about the swing-dev mailing list