JDK-4876801 : Iconified frame with modal dialog cannot be deiconified
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1,1.4.1_02,1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2003-06-10
  • Updated: 2006-02-10
  • Resolved: 2006-02-10
Related Reports
Relates :  
Description
Name: jk109818			Date: 06/10/2003


FULL PRODUCT VERSION :
java version "1.4.1_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06)
Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode)

FULL OS VERSION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
There'a a JFrame, which is a owner of an opened modal dialog. If frame was programmatically iconified, then frame cannot be deiconified by clicking Windows taskbar.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run the attached sample program - frame and dialog are shown
2. Press button with "Minimize" caption - frame gets iconified
3. Click frame's tab in Windows taskbar - frame DOES NOT get deiconified

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Frame should be deiconified.
ACTUAL -
Frame is not deiconified.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;


public class A {
  public static void main(String[] args) {
    final JFrame frame = new JFrame("Test");
    frame.setLocation(0, 0);
    frame.setSize(800, 600);
    frame.setVisible(true);
    final JDialog dialog = new JDialog(frame, true);
    dialog.setSize(400, 200);
    Container contentPane = dialog.getContentPane();
    contentPane.setLayout(new BorderLayout());
    JButton button = new JButton("Minimize");
    button.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          frame.setExtendedState(JFrame.ICONIFIED);
        }
      }
    );
    contentPane.add(button, BorderLayout.CENTER);
    dialog.setVisible(true);
  }
}

---------- END SOURCE ----------
(Review ID: 187004) 
======================================================================
###@###.### 10/5/04 09:44 GMT

Comments
EVALUATION Name: osR10079 Date: 06/19/2003 It's interesting issue. Modal dialog should block al users actions on its parent thus as soon as you PROGRAMMATICALLY iconify its parent you should be unable restore it MANUALLY (but you are ably to do this programmatically). From the other hand, on Solaris user is able to restore it manually. Thus we have difference in behavior across platforms. ###@###.### 2003-06-20 ====================================================================== ###@###.### 10/5/04 09:44 GMT
20-06-2003