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

后端 未结 2 1929
渐次进展
渐次进展 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:07

    I have an object which is invoked from the main GUI thread and shows a separate JFrame

    If you want to show more than one TopLayoutContainer(s) maybe it is better to look for JDialog because with that you can play with ModalityType & toFront().

    Isn't method show() deprecated and replaced with method JDialog.setVisible(boolean)?

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题