How can I create a modal JDialog, that blocks only the owner (JFrame or JDialog) and not the whole application (or applet)?
- Add a WindowListener to the JDialog. In the windowClosed(WindowEvent we) "enable" the JFrame.
- Before showing the JDialog disable the JFrame.
- Show the JDialog.
Yes, I have been also annoyed by the flip-flops in the behaviour of modal dialogs. In fact making it Application modal is almost a death nail for SDI applications. Sun is going to support degree of modality in future version (JDK1.4 I think).
Davanum Srinivas addsYou can extend the Semi-Modal concept as described in JavaTip-89 at:
This involves manipulating event queues to handle the Keyboard and Mouse events.