RFR: 8300405: Screen capture for test JFileChooserSetLocationTest.java, failure case
Sergey Bylokhov
serb at openjdk.org
Fri Jan 20 15:12:39 UTC 2023
On Fri, 20 Jan 2023 09:41:37 GMT, Tejesh R <tr at openjdk.org> wrote:
>> test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java line 189:
>>
>>> 187: System.out.println("Test passed");
>>> 188: } else {
>>> 189: Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
>>
>> I think what you want to use here is the bounds of the screen, not the size, since the screen coordinates may start from non-zero values.
>
> GraphicsConfiguration gc = GraphicsEnvironment.
> getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
> Rectangle gcBounds = gc.getBounds();
>
> This way?
yes.
-------------
PR: https://git.openjdk.org/jdk/pull/12060
More information about the client-libs-dev
mailing list