File tree Expand file tree Collapse file tree
test/jdk/java/awt/Mouse/GetMousePositionTest Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2013, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2013, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -94,9 +94,13 @@ public static void main(String[] args) throws Exception {
9494 robot .mouseMove (MOUSE_POS3 , MOUSE_POS3 );
9595 syncLocationToWindowManager ();
9696 } finally {
97- SwingUtilities .invokeLater (() -> {
98- frame1 .dispose ();
99- frame2 .dispose ();
97+ SwingUtilities .invokeAndWait (() -> {
98+ if (frame1 != null ) {
99+ frame1 .dispose ();
100+ }
101+ if (frame2 != null ) {
102+ frame2 .dispose ();
103+ }
100104 });
101105 }
102106 }
You can’t perform that action at this time.
0 commit comments