Sì, lo precisa anche la documentazione:
Notes for modal dialogs.
setVisible(true): If the dialog is not already visible, this call will not return until the dialog is hidden by calling setVisible(false) or dispose.
E poi aggiunge anche:
It is OK to call this method from the event dispatching thread because the toolkit ensures that other events are not blocked while this method is blocked.
Se invochi setVisible(true) nel contesto del EDT, non blocchi altri eventi, perché il "loop" degli eventi continua ad essere gestito anche lì dentro in quel contesto.


Rispondi quotando