JDK-4038690 : AWT threads never die
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1,1.1.4
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1,windows_95
  • CPU: x86,sparc
  • Submitted: 1997-03-13
  • Updated: 1998-02-13
  • Resolved: 1998-02-13
Related Reports
Duplicate :  
Description

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 - ###@###.###
======================================================================

Comments
WORK AROUND Name: mc57594 Date: 03/13/97 Call System.exit(). ======================================================================
11-06-2004