RFR: 8224261: JProgressBar always with border painted around it
Sergey Bylokhov
serb at openjdk.org
Thu Nov 16 06:53:33 UTC 2023
On Tue, 14 Nov 2023 07:06:45 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:
>> test/jdk/javax/swing/JProgressBar/TestProgressBarBorder.java line 79:
>>
>>> 77:
>>> 78: BufferedImage borderPaintedImg =
>>> 79: robot.createScreenCapture(new Rectangle(pt.x, pt.y,
>>
>> I think the test can be simplified by rendering the progress bar into the buffered image directly.
>
> I couldn't understand. Can you please explain a bit more?
It is not necessary to add the progress bar to the frame and then capture the pixels by the robot. you can render content of the progress bar directly to the BufferedImage.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16467#discussion_r1395222765
More information about the client-libs-dev
mailing list