Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4087910

JDK 1.1.5C regression: modal Dialogs cannot be hidden

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.1.5
    • Fix Version/s: 1.1.5
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.1.5
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      Verified

      Description



      Name: diC59631 Date: 10/22/97


      I am writing from Oracle, a licensee.
      This is regarding the pre-release version,
      JDK 1.1.5C.
      Between JDK 1.1.5A and 1.1.5C, something has
      broken the modal Dialog handling.
      Once displayed, modal Dialogs cannot be hidden.
      Trying to hide a modal Dialog does
      nothing to the Dialog, and it remains visible,
      even though its isShowing() method is correctly
      returning false.
      Soon afterwards, the VM will hang.
      I am running JDK 1.1.5C on WinNT 4.0.
      Here is the test case:

      /*
      - Run the test case, which displays a Frame.
      - Click on the "Dialog!" button of the displayed Frame.
        A modal Dialog should appear.
      - Click on the modal Dialog's "Hide!" button:
        ... if the bug exists, the modal Dialog does not disappear
            as expected, although the VM returns the focus back to
            the original Frame. You may even be able to create
            other modal Dialogs by pressing on the "Dialog!" button.
            Sometimes the modal Dialog does disappear, but the VM hands.
        ... if the bug has been fixed, the modal Dialog is hidden.
      */

      import java.awt.*;
      import java.awt.event.*;

      public class b567200 extends Frame implements ActionListener
      {
      static public void main(String[] args)
      {
      b567200 bb = new b567200();
      bb.setBounds(10,10,350,350);
      bb.setVisible(true);
      }

      public b567200()
      {
      super();
      setLayout(null);
      Button dlgButton = new Button("Dialog!");
      dlgButton.setBounds(200,250,100,50);
      add(dlgButton);
      dlgButton.addActionListener(this);
      }

      public void actionPerformed(ActionEvent e)
      {
      MyDialog dlg = new MyDialog(this);
      dlg.setBounds(400, 100, 300, 300);
      dlg.setVisible(true);
      }
      }

      class MyDialog extends Dialog implements ActionListener
      {
      MyDialog(Frame parent)
      {
      super(parent,"Test Dialog", true);
      Button dlgButton = new Button("Hide!");
      dlgButton.setBounds(200,250,100,50);
      add(dlgButton);
      dlgButton.addActionListener(this);
      }

      public void actionPerformed(ActionEvent e)
      {
      setVisible(false);
      }
      }
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              duke J. Duke (Inactive)
              Reporter:
              dindrigo Daniel Indrigo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: