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

AWT threads never die

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1, 1.1.4
    • client-libs
    • None
    • x86, sparc
    • solaris_2.5.1, windows_95



      Name: mc57594 Date: 03/13/97


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


      class MyFrame extends Frame implements WindowListener
      {
        MyFrame(String name)
        {
          super(name);
          setBounds(100, 100, 100, 100);
          setVisible(true);
          addWindowListener(this);
        }

        public void windowClosed(WindowEvent event) {
        }

        public void windowDeiconified(WindowEvent event) {
        }

        public void windowIconified(WindowEvent event) {
        }

        public void windowActivated(WindowEvent event) {
        }

        public void windowDeactivated(WindowEvent event) {
        }

        public void windowOpened(WindowEvent event) {
        }

        public void windowClosing(WindowEvent event)
        {
          dispose();
        }
      }



      public class AWTTest
      {
        public static void main(String[] args)
        {
          Object queue = new Object();

          MyFrame fr = new MyFrame("Window");
        }
      }



      This program never exits because AWT threads are still alive.
      Why these threads are not daemon threads ?
      I think it's a bug. It would be a cleaner way to exit AWT than
      calling System.exit().

      company - EPFL, Switzerland , email - ###@###.###
      ======================================================================

            tballsunw Tom Ball (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: