On Tue, 12 Mar 2024 08:33:41 GMT, Alexey Ivanov <[email protected]> wrote:

> This is to simplify `TrayIconScalingTest.java`.
> 
> 1. Rename `createAndShowGUI` to `createAndShowTrayIcon` which is more 
> specific.
> 2. Move creating tray icon to the top.
> 3. Streamline PassFailJFrame with the chained calls, including 
> `awaitAndCheck`.
> 4. Ensure tray is not null before removing the icon.
> 5. Pass AWTException as the cause in the wrapped exception.
> 
> Previously, before the builder pattern was introduced, 
> `PassFailJFrame.positionTestWindow` had had to be called to show the 
> instructions UI. It's not required any more. Additionally, it has the effect 
> of moving the instruction frame to the left, which doesn't look good and 
> sometimes results in positioning the instructions outside of the screen 
> bounds if the screen resolution is low.
> 
> With the builder pattern, the call to the `build` method shows all the 
> registered windows on the screen, including the instruction frame. Since 
> there's no secondary UI, the instructions remain in the centre of the screen.

Changes looks good.

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

Marked as reviewed by honkar (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18224#pullrequestreview-1931662180

Reply via email to