RFR: 8333403: Write a test to check various components events are triggered properly [v4]

Alexey Ivanov aivanov at openjdk.org
Fri Jul 5 20:34:32 UTC 2024


On Thu, 4 Jul 2024 10:22:15 GMT, Ravi Gupta <rgupta at openjdk.org> wrote:

>> test/jdk/java/awt/event/ComponentEvent/ComponentEventTest.java line 171:
>> 
>>> 169:         EventQueue.invokeAndWait(() -> {
>>> 170:             frame.dispose();
>>> 171:             frame.setVisible(true);
>> 
>> I'm not really understanding this part. Why do you dispose the frame then setVisible here?
>
> Thanks to providing the review comments here I want to revalidate the screen resources by dispose and setVisible the frame before the frame ICONIFIED test.
> 
> These lines are not required , After removing these lines test also works fine.

You should not call any methods of the frame after you called `dispose`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19521#discussion_r1667118343


More information about the client-libs-dev mailing list