On Tue, 19 Mar 2024 12:16:08 GMT, Abhishek Kumar <[email protected]> wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> reduce delay
>
> test/jdk/java/awt/Frame/InitialMaximizedTest/InitialMaximizedTest.java line
> 55:
>
>> 53:
>> EventQueue.invokeAndWait(InitialMaximizedTest::createAndShowFrame);
>> 54: robot.waitForIdle();
>> 55: robot.delay(2000);
>
> delay is too long ? Generally we have 1000 ms delay after creating test UI.
Reduced
> test/jdk/java/awt/Frame/InitialMaximizedTest/InitialMaximizedTest.java line
> 81:
>
>> 79: System.out.println("GraphicsConfiguration bounds " +
>> gc.getBounds());
>> 80: System.out.println("Screen insets: " + screenInsets);
>> 81: System.out.println("Work area: " + workArea);
>
> Is it intentional to keep so many print statement?
Looks cleaner to me than
System.out.println(
"Frame bounds " + frameBounds +
"\nGraphicsConfiguration bounds " + gc.getBounds() +
"\nScreen insets: " + screenInsets +
"\nWork area: " + workArea
);
> test/jdk/java/awt/Frame/InitialMaximizedTest/InitialMaximizedTest.java line
> 94:
>
>> 92: frame.setLocation(50, 50);
>> 93: frame.setExtendedState(Frame.MAXIMIZED_BOTH);
>> 94: frame.addWindowListener(new WindowAdapter() {
>
> Suggestion:
> May be replaced with
> `frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);`
`java.awt.Frame` does not have the `setDefaultCloseOperation`, it is a `JFrame`
method.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18367#discussion_r1530575589
PR Review Comment: https://git.openjdk.org/jdk/pull/18367#discussion_r1530572855
PR Review Comment: https://git.openjdk.org/jdk/pull/18367#discussion_r1530575047