On Fri, 5 Aug 2022 00:45:59 GMT, Harshitha Onkar <hon...@openjdk.org> wrote:
>> Additional position setting (TOP_LEFT_CORNER) and a method to obtain bounds >> of test instruction frame are added to PassFailJFrame to handle positioning >> of multiple test frames. >> >> In scenarios where multiple test windows might be present, the test windows >> might overlap the instruction frame. In order to fix this TOP_LEFT_CORNER >> position option is added that positions the test instruction frame at top >> left corner with main test window below it. >> >> Additionally `getInstructionFrameBounds()` is added to obtain the position >> and dimensions of test instruction frame. > > Harshitha Onkar has updated the pull request incrementally with one > additional commit since the last revision: > > added Thread.sleep and changed the location of setVisible Added null check for `testWindow` in `positionWindow` as the following line `testWindow.setLocation(.....);` will produce NPE if `positionWindow` is called with `testWindow = null`. Additionally, some tests do not require a testWindow, for example [TrayIconScalingTest.java](https://github.com/openjdk/jdk/blob/f9bb3676e3d2c5fe0ae505d3bcbf434f7acb524f/test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java#L81) in which case we can call `PassFailJFrame.positionTestWindow(null,PassFailJFrame.Position.HORIZONTAL);` ------------- PR: https://git.openjdk.org/jdk/pull/9525