RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v12]

Alexey Ivanov aivanov at openjdk.java.net
Wed May 25 12:49:56 UTC 2022


On Wed, 25 May 2022 12:30:12 GMT, Tejesh R <duke at openjdk.java.net> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Test update
>
> 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.

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

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



More information about the client-libs-dev mailing list