Stumped by this, but maybe, just maybe, someone has had this problem before and can point me in the right direction...
I have a JDialog for displaying the progress of a long-running task, which I have expressly created as modal with a defined owner:
progressDialog = new JDialog( ((Dialog)windowParent), true );
...
progressDialog.setVisible( true );
Later on, once the task is complete, I close the dialog again:
protected void done() {
SwingUtilities.invokeLater( new Runnable() {
public void run() {
progressDialog.setVisible( false );
}
} );
}
Under very rare circumstances, the dialog a) does not close, and b) is not truly modal, i.e. the user is able to interact with the window behind the (theoretical) dialog. Any ideas what might be causing this? Unfortunately it happens very rarely and until now, only on Linux systems. Could this be a Swing bug or am I possibly doing something wrong?