<AWT Dev> Review Request for 8160696: IllegalArgumentException: adding a component to a container on a different GraphicsDevice

Mikhail Cherkasov mikhail.cherkasov at oracle.com
Wed Aug 10 15:07:07 UTC 2016


Right, it addes it to other frame later:

  frms[1].add(canvas);


On 10.08.2016 17:49, Sergey Bylokhov wrote:
> How this test will fail before the fix? since the canvas is added only 
> once "frms[0].add(canvas);" It seems that it should be added to the 
> first and then to the second frame, no?
>
> On 10.08.16 17:38, Mikhail Cherkasov wrote:
>> Hi Sergey, all,
>>
>> There's an update test:
>> http://cr.openjdk.java.net/~mcherkas/8160696/webrev.01/
>>
>> Thanks,
>> Mikhail.
>>
>> On 05.08.2016 21:17, Sergey Bylokhov wrote:
>>> Hi, Mikhail.
>>> Please update the header of the test and rename it to some meaningful
>>> name. Also note that the frames should be disposed at the end of the
>>> test.
>>>
>>> On 05.08.16 19:19, Mikhail Cherkasov wrote:
>>>> Hi all,
>>>>
>>>> Please review a fix for the following bug:
>>>> https://bugs.openjdk.java.net/browse/JDK-8160696
>>>> webrev:
>>>> http://cr.openjdk.java.net/~mcherkas/8160696/webrev.00/
>>>>
>>>> Java throws exception: "IllegalArgumentException: adding a 
>>>> component to
>>>> a container on a different GraphicsDevice" if you move a Java
>>>> application to different monitor and
>>>> add a Component to a Container on another graphics device, without
>>>> explicitly
>>>> removing the Component from its previous parent.
>>>>
>>>> Moving components between containers works fine if you remove the
>>>> component
>>>> manually before moving it to other container, however this is already
>>>> done in addImpl
>>>> method, so I've just put a removing the component from old parent 
>>>> before
>>>> " checkGD".
>>>> It works fine now and I'm not sure whether we need "checkGD" at all,
>>>> however I leave it
>>>> there just in case.
>>>>
>>>> Thanks,
>>>> Mikhail.
>>>
>>>
>>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20160810/df8ca62a/attachment-0001.html>


More information about the awt-dev mailing list