如何使主GUI线程“等待”,直到一个单独的弹出窗口消失。
||
我有一个从主GUI线程调用的对象,该对象显示一个单独的JFrame数秒,然后消失(使用计时器)。现在,我要使主GUI线程等待,直到弹出的JFrame窗口消失为止。例如,在主GUI代码上:
// initiate the object and show the pop-up JFrame
DisappearingJFrame djf = new DisappearingJFrame ();
djf.show ();
// now the main GUI thread should wait
// and after the pop-up JFrame disappears, the rest of the code is then executed
...
...
任何建议都将受到欢迎。谢谢。
没有找到相关结果
已邀请:
2 个回复
枫湃揩乾纲
碉罕城爸
是否已被弃用并由方法JDialog.setVisible(boolean)取代?