On Fri, 17 Nov 2023 15:00:49 GMT, Abhishek Kumar <[email protected]> wrote:
>> JProgressBar is always painted with border irrespective of the value set via
>> the API `setBorderPainted(boolean value)` in Synth (Nimbus and GTK) LAF.
>> Proposed fix is to add a check before painting the component.
>>
>> CI jobs are green after the fix. Links attached to JBS.
>
> Abhishek Kumar has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Review comment fix
Changes look logical and work as expected.
test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java line 70:
> 68: isImgSame = Util.compareBufferedImages(borderPaintedImg,
> borderNotPaintedImg);
> 69:
> 70: if (isImgSame) {
Maybe worth renaming `isImgSame` to something that reads slightly smoother like
`isImgEqual`, `isEqual`, or `isMatching`. Could just even inser the
`Util.compareBufferedImages()` into the if statement for the failure check if
you prefer. But I like the variable for better readability.
test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java line 92:
> 90: private static void createAndShowUI() {
> 91: progressBar = new JProgressBar();
> 92: progressBar.setSize(100,50);
Suggestion:
progressBar.setSize(100, 50);
-------------
Marked as reviewed by dnguyen (Committer).
PR Review: https://git.openjdk.org/jdk/pull/16467#pullrequestreview-1738070215
PR Review Comment: https://git.openjdk.org/jdk/pull/16467#discussion_r1397976092
PR Review Comment: https://git.openjdk.org/jdk/pull/16467#discussion_r1397974704