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

后端 未结 5 1479
一向
一向 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:44

    Within your Java application, I think you're out of luck: I haven't checked, but I think that JOptionPane's showXXXDialog methods pop up a so-called modal dialog that keeps the rest of the GUI from the same JVM inactive.

    However, Java doesn't have any foreground-grabbing super powers: You should still be able to Alt-Tab to other (non-Java) applications.

提交回复
热议问题