-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
7
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux vosminog 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
KDE4 (not tested with GNOME)
A DESCRIPTION OF THE PROBLEM :
A modal JDialog (with JFrame as parent) can be iconified but cannot be DEiconified (no button for it on the taskbar). The only recourse is to kill the application.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1a. Create a JFrame. Make JFrame visible (optional: resize for comfort)
1b. Create modal JDialog with the JFrame as parent, and modal parameter 'true' (optional: populate with content and/or resize for comfort)
1c. Show JDialog (optional: verify that all input to JFrame is now blocked)
2. Click JDialog's "iconify" button in window decoration. JDialog is iconified but there is no means available to deiconify it.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A modal JDialog should not offer an iconify button in the window decoration (or allow itself to be iconified by any other means if there are any).
ACTUAL -
Modal JDialog can be iconified (and all input to parent JFrame remains blocked). No means is available (e.g. in task bar) to deiconify the JDialog and restore the application to interactiveness. Only recourse is to kill the application.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
JFrame main = new JFrame("main");
main.setSize(320,200); // optional
main.setVisible(true);
JDialog dialog = new JDialog(main,"modal dialog",true); // true => modal
dialog.getContentPane().add( new JLabel("iconify me and weep") ); // optional
dialog.setVisible(true);
// we continue here only after JDialog is closed manually or via setVisible(false)
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Add a WindowListener/WindowAdapter to the JDialog. In windowDecactivated (yes, windowDeactivated!) method, call setVisible(false) on the JDialog, effectively making iconifying the JDialog equivalent to closing it.
NOTE: The more logical windowIconified method is never called when the JDialog is iconified. I suspect that is evidence that a modal JDialog was never meant to support iconifying in the first place.
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux vosminog 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
KDE4 (not tested with GNOME)
A DESCRIPTION OF THE PROBLEM :
A modal JDialog (with JFrame as parent) can be iconified but cannot be DEiconified (no button for it on the taskbar). The only recourse is to kill the application.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1a. Create a JFrame. Make JFrame visible (optional: resize for comfort)
1b. Create modal JDialog with the JFrame as parent, and modal parameter 'true' (optional: populate with content and/or resize for comfort)
1c. Show JDialog (optional: verify that all input to JFrame is now blocked)
2. Click JDialog's "iconify" button in window decoration. JDialog is iconified but there is no means available to deiconify it.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
A modal JDialog should not offer an iconify button in the window decoration (or allow itself to be iconified by any other means if there are any).
ACTUAL -
Modal JDialog can be iconified (and all input to parent JFrame remains blocked). No means is available (e.g. in task bar) to deiconify the JDialog and restore the application to interactiveness. Only recourse is to kill the application.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
JFrame main = new JFrame("main");
main.setSize(320,200); // optional
main.setVisible(true);
JDialog dialog = new JDialog(main,"modal dialog",true); // true => modal
dialog.getContentPane().add( new JLabel("iconify me and weep") ); // optional
dialog.setVisible(true);
// we continue here only after JDialog is closed manually or via setVisible(false)
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Add a WindowListener/WindowAdapter to the JDialog. In windowDecactivated (yes, windowDeactivated!) method, call setVisible(false) on the JDialog, effectively making iconifying the JDialog equivalent to closing it.
NOTE: The more logical windowIconified method is never called when the JDialog is iconified. I suspect that is evidence that a modal JDialog was never meant to support iconifying in the first place.