-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.1
-
x86
-
windows_98
When the default close operation is set as DISPOSE_ON_CLOSE in a JFrame, closing the JFrame hangs java. This is seen in build 11 of hopper. The test case given below exits cleanly in build 10. This can be seen from the console output pasted below :
[Z:/work/temp] jdk_1.4.1/b10/binaries/win/bin/java -showversion temp4
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b10)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
Closing the window
[Z:/work/temp] jdk_1.4.1/b11/binaries/win/bin/java -showversion temp4
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b11)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b11, mixed mode)
Closing the window
How to reproduce the problem :
1. Compile and run the source code given.
2. A JFrame appears. Close this frame.
3. Although the frame gets closed, the console does not return to the command prompt as it should.
-----------------BEGIN SOURCE-----------------------
import javax.swing.*;
import java.awt.event.*;
public class test extends JFrame{
public static void main (String [] args){
new test();
}
public test(){
super("Test Frame");
setSize(100,100);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
System.err.println("Closing the window");
}
});
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
show();
}
}
------------------------END SOURCE----------------------
[Z:/work/temp] jdk_1.4.1/b10/binaries/win/bin/java -showversion temp4
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b10)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b10, mixed mode)
Closing the window
[Z:/work/temp] jdk_1.4.1/b11/binaries/win/bin/java -showversion temp4
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b11)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b11, mixed mode)
Closing the window
How to reproduce the problem :
1. Compile and run the source code given.
2. A JFrame appears. Close this frame.
3. Although the frame gets closed, the console does not return to the command prompt as it should.
-----------------BEGIN SOURCE-----------------------
import javax.swing.*;
import java.awt.event.*;
public class test extends JFrame{
public static void main (String [] args){
new test();
}
public test(){
super("Test Frame");
setSize(100,100);
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent we){
System.err.println("Closing the window");
}
});
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
show();
}
}
------------------------END SOURCE----------------------
- duplicates
-
JDK-4683602 creating a DragSource causes a hang in windows 98
- Closed