RFR: JDK-8015739: Background of JInternalFrame is located out of JInternalFrame [v4]

Harshitha Onkar honkar at openjdk.org
Tue Oct 4 18:14:28 UTC 2022


On Mon, 3 Oct 2022 21:57:17 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removed redundant jtreg header
>
> Out of curiosity, can this test use `BufferedImage` to render `JInternalFrame` into?

@aivanov-jdk Regarding saving the screen capture -

- When JIF bounds are used, a partial image of JInternalFrame (JIF) is saved. Hence I'm using the entire JFrame bounds to capture the screenshot.
- For the screenCapture I wanted to use **BufferedImage's getScaledInstance()** to create the scaled version (code snippet below), but experiencing issues while saving it. Currently I'm scaling the original image and re-drawing it using graphics object.


BufferedImage bufferedImage= robot.createScreenCapture(jFrameBounds);
Image image= bufferedImage.getScaledInstance((int) (scale * bufferedImage.getWidth(null)),
	(int) (scale * bufferedImage.getHeight(null)), Image.SCALE_DEFAULT);

-------------

PR: https://git.openjdk.org/jdk/pull/10274



More information about the client-libs-dev mailing list