On Tue, 14 Nov 2023 07:06:45 GMT, Abhishek Kumar <[email protected]> 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

Reply via email to