Test update

This commit is contained in:
Prasanta Sadhukhan 2026-01-28 06:58:26 +00:00
parent 91151bce29
commit b588d51d85
2 changed files with 7 additions and 1 deletions

View File

@ -966,7 +966,6 @@ public class JPopupMenu extends JComponent implements Accessible,MenuElement {
ui.installUI(this);
}
invalidate();
}
/**

View File

@ -30,6 +30,7 @@
*/
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Robot;
import java.util.concurrent.CountDownLatch;
@ -48,6 +49,7 @@ public class TestPopupInvoker {
static JFrame frame;
static JLabel label;
static Container pane;
static volatile Component invoker;
private static final CountDownLatch popupShown = new CountDownLatch(1);
private static final CountDownLatch popupHidden = new CountDownLatch(1);
@ -107,6 +109,11 @@ public class TestPopupInvoker {
if (!popupHidden.await(1, SECONDS)) {
throw new RuntimeException("Popup is visible after component is removed");
}
SwingUtilities.invokeAndWait(() -> invoker = popupMenu.getInvoker());
if (invoker != null) {
throw new RuntimeException("Invoker is not null");
}
} finally {
SwingUtilities.invokeAndWait(() -> {
if (frame != null) {