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