On Thu, 16 Nov 2023 12:23:03 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> 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. > > There are a number of tests which do this, scaled borders are those that come > to my mind first: > > https://github.com/openjdk/jdk/blob/1d9688667e667dc710d64e52f1e918e047beaca3/test/jdk/javax/swing/border/EtchedBorder/ScaledEtchedBorderTest.java#L300-L311 Another example: https://github.com/openjdk/jdk/blob/b7425b63f6b69ba8709664377b4e037176ab6139/test/jdk/javax/swing/text/FlowView/6318524/bug6318524.java#L176-L185 Here `textPane` component is painted to the `BufferedImage`. Use the image to analyse rendering. (In many cases, such a test can run *headless*.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16467#discussion_r1395621776