Commit c54bca6 Harshitha Onkar
committed Jan 12, 2024
1 parent 95a9168 commit c54bca6 Copy full SHA for c54bca6
File tree 1 file changed +8
-4
lines changed
test/jdk/java/awt/Mouse/GetMousePositionTest
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
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.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* 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 {
94
94
robot .mouseMove (MOUSE_POS3 , MOUSE_POS3 );
95
95
syncLocationToWindowManager ();
96
96
} 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
+ }
100
104
});
101
105
}
102
106
}
You can’t perform that action at this time.
0 commit comments