Skip to main content

Iconifying modal JDialog prevents uniconifying (KDE)

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2003-06-16

Is there a way to mark a modal JDialog so that it cannot be iconified?

It seems to me that a modal JDialog, such as created with 'true' argument to the constructor) should not be iconifiable in the first place, but under KDE4 the JDK build 1.7.0-b147 allows a modal JDialog to be iconified, leaving the main window blocked, and the JDialog irretrievably inaccessible after that (cannot be uniconified). The only recourse is to kill the application!

A rather shaky "solution" I have found so far is to close the JDialog (setVisible(false)) using the windowDeactivated method of a WindowListener added to the JDialog, which makes the iconify icon in the titlebar equivalent to the close button (it works but is obviously misleading and suboptimal). And, FWIW, the windowIconified method on the WindowListener is never called.

Is there a better way?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-07-24

You might want to file a bug report at