79755407

Date: 2025-09-04 07:42:59
Score: 0.5
Natty:
Report link

Or is my whole idea of running entire tests in the EDT doomed from the start

When it comes to modal dialogs, yes.

How do I assert on Swing modal dialogs?

Upon asynchronously calling a blocking showing method (e.g. with SwingUtilities.invokeLater()), you waitForIdle() outside of the EDT and then assert.

All creations, mutations, access of Swing components, on the other hand, should be done in the EDT. See this answer for an example.

Reasons:
  • Blacklisted phrase (1): How do I
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: Sergey Zolotarev