Can I use a Java JOptionPane in a non-modal way?

后端 未结 5 1486
一向
一向 2020-11-30 10:03

I am working on an application which pops up a JOptionPane when a certain action happens. I was just wondering if it was possible that when the JOptionPane does pop up how c

5条回答
  •  天命终不由人
    2020-11-30 10:41

    You should be able to get more information here: http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html

    A Dialog can be modal. When a modal Dialog is visible, it blocks user input to all other windows in the program. JOptionPane creates JDialogs that are modal. To create a non-modal Dialog, you must use the JDialog class directly.

    Starting with JDK6, you can modify Dialog window modality behavior using the new Modality API. See The New Modality API for details.

提交回复
热议问题