How to make the main GUI thread 'wait' until a separate pop-up window is disappeared

后端 未结 2 1931
渐次进展
渐次进展 2021-01-25 01:03

I have an object which is invoked from the main GUI thread and shows a separate JFrame for a number of seconds and then disappear (with the use of a timer). Now I want to make t

2条回答
  •  无人共我
    2021-01-25 01:21

    Don't use a separate JFrame for this is what modal dialogs were built for. Use either a JOptionPane or a modal JDialog.

提交回复
热议问题