On Wed, 28 Aug 2024 09:19:51 GMT, Manukumar V S <m...@openjdk.org> wrote:
>> test/jdk/javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java line 187: >> >>> 185: Point buttonLoc = buttonLocRef.get(); >>> 186: System.out.println("Button loc: " + buttonLoc); >>> 187: bimage = robot.createScreenCapture(new >>> Rectangle(buttonLoc.x, buttonLoc.y, button.getWidth(), button.getHeight())); >> >> Can we return the capturedScreen directly? I guess **yes** and then >> BufferedImage object is not required and can be removed. > > The screen captured BufferedImage(bimage) is directly returned now, do you > want to change it ? Ohh you are talking about the BufferedImage object, yes it is needed as the screen capture is inside a try block. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20532#discussion_r1734328708