RFR: 8301606: JFileChooser file chooser details view "size" label cut off in Metal Look&Feel [v3]

Alexey Ivanov aivanov at openjdk.org
Wed Jul 26 10:23:47 UTC 2023


On Wed, 26 Jul 2023 08:08:03 GMT, Tejesh R <tr at openjdk.org> wrote:

>> test/jdk/javax/swing/JTableHeader/JTableHeaderLabelRightAlignTest.java line 108:
>> 
>>> 106:         for (int i = 1; i < imgHeader.getHeight()-3; i++) {
>>> 107:             for (int j = verticalLineCol; j < verticalLineCol + 1; j++) {
>>> 108:                 if (expectedRGB != imgHeader.getRGB(j, i)) {
>> 
>> Suggestion:
>> 
>>         for (int i = 1; i < imgHeader.getHeight()-3; i++) {
>>             for (int j = verticalLineCol; j < verticalLineCol + 1; j++) {
>>                 if (expectedRGB != imgHeader.getRGB(j, i)) {
>> 
>> These are coordinates, so name them as `x` and `y`. Adding the coordinates would help an engineer dealing with the test failure the clue what went wrong, that engineer could be you.
>> 
>> The height should also be scaled: `(int) (imgHeader.getHeight() * SCALE - 3);`
>
> For height, I am using BufferedImage height, not TableHeader height. So I guess it is fine.

Blimey! Sorry for my confusion, you're right.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14464#discussion_r1274741691



More information about the client-libs-dev mailing list