RFR: 8311031: JTable header border vertical lines are not aligned with data grid lines [v9]
Alexey Ivanov
aivanov at openjdk.org
Tue Aug 1 10:41:04 UTC 2023
On Tue, 1 Aug 2023 04:31:23 GMT, Tejesh R <tr at openjdk.org> wrote:
>> test/jdk/javax/swing/JTableHeader/TableHeaderBorderPositionTest.java line 127:
>>
>>> 125: e.printStackTrace();
>>> 126: }
>>> 127: }
>>
>> In fact, it looks better with `saveImage` method.
>
> Since we are saving only once, I don't think separate method is required.
It is not required but it separates the duties: the `test` method *verifies* the rendering, it calls `saveImage` to save the image. Such a design is in the spirit of OOP.
As bonus, it allows one to save the image easily before it is verified or even after each paint is performed, which I used for my own testing. Thus, it has its benefits.
I'm not insisting, even though I think it's a better design.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14766#discussion_r1280436422
More information about the client-libs-dev
mailing list