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

Exception unter Win NT 3.51 after dispose a Frame.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 1.1
    • client-libs
    • None
    • x86
    • windows_nt

    Description



      Name: mc57594 Date: 02/21/97


      Hi all,

      May be is that a Feature or a WinNT3.5 Bug,
      because there is no problem on WinNT4.0.

      The simple programm opens a Frame window which
      contains a button.

      When we click on this button, a second frame with a button
      appears.

      When we click on this last button, this frame is hidden
      with hide() and disposed with dispose().

      Then the exception comes (at once or after few times).

      I didn't see anything about this problem in known-bug-list,
      I would like to know if that's a Windows bug,
      a Virtual-machine bug or a failer in my programm.

      Thanks for all,

      Philippe.

      Here is the code.
      #
      # TestSubWnd.java
      #
      import java.awt.*;

      public class TestSubWnd extends Frame
      {
              String message;
              Button myBt;
              TextArea myText;

              public TestSubWnd (String title)
              {
                      super (title);
                      myBt = new Button ("Button...");
                      add("South", myBt);
              }
              public boolean handleEvent (Event e)
              {
                      if (e.id == e.ACTION_EVENT)
                      {
                              NewWnd wnd = new NewWnd (this, "Test Standart Window");
                              return true;
                      }
                      return super.handleEvent(e);
              }

              public static void main (String args[])
              {
                      TestSubWnd f = new TestSubWnd("Test von Subwindow");
                      f.pack();
                      f.show();
              }
      }
      # End of TestSubWnd.java #


      #
      # NewWnd.java
      #
      import java.awt.*;

      public class NewWnd extends Frame
      {
              Button stdBt1;

              /*
               * Constructor for the new window (frame).
               */
              public NewWnd (Frame parent, String title)
              {
                      super (title);

                      stdBt1 = new Button ("stdBt1");
                      add (stdBt1);

                      // Show the window.
                      this.pack();
                      this.show();
              }

              /*
               * Method for events.
               */
              public boolean handleEvent (Event e)
              {
                      switch (e.id)
                      {
                              case e.ACTION_EVENT:
                                      if (e.target == stdBt1) // Close1.
                                      {
                                              this.hide();
                                              this.dispose();
                                              return true;
                                      }
                      }
                      return super.handleEvent(e);
              }
      }
      # End of NewWnd.java #


      company - ISD-projektmanagment , email - ###@###.###
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              dmendenhsunw David Mendenhall (Inactive)
              mchamnessunw Mark Chamness (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: