On Wed, 25 May 2022 12:45:53 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 115:
>> 
>>> 113:         f.add(scrollpane);
>>> 114:         f.setSize(1000, 800);
>>> 115:         f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
>> 
>> setDefaultCloseOperation() is required.....?
>
> Good catch! Not really… It must not be `EXIT_ON_CLOSE`. The default value is 
> `HIDE_ON_CLOSE` and it would work well because the frame will be disposed of 
> after the latch is released.
> 
> And here I see another problem: the frame that's created by test has to 
> handle `WindowListener.windowClosing`. Since it's required by all tests, 
> `PassFailJFrame` should provide a default listener for this purpose.

There are many swing tests that has EXIT_ON_CLOSE so not sure if it's a problem 
.There are couple which have DISPOSE_ON_CLOSE which I can changed to but not 
sure if it will have any effect..

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

PR: https://git.openjdk.java.net/jdk/pull/8141

Reply via email to