My application has several JFrames. One of them might display an application modal dialog using JOptionPane.showConfirmDialog(), for example if the user tries closing the frame with unsaved changes.
The modal dialog blocks input to the other frames, as intended, but it doesn't prevent other windows coming to the front. This might happen if a notification occurs and one of the other frames calls toFront(), for example, or if the user clicks on one of the other windows.
As a result, the modal dialog can get hidden behind other windows and the user is left thinking the application has locked up, unless they hunt around and manage to find the correct window.
This sounds like a bug to me. Java 6 on Mac OS X ensured that a modal dialog always stayed on top but with Java 7 they can end up stuck behind other windows which is very undesirable. Is there any simple way to get the old behaviour back? Preferably without having to change showXXXDialog() to createDialog()/setVisible(true) in hundreds of places!