Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2039475 | 1.4.0 | Devananda Jayaraman | P4 | Resolved | Fixed | beta |
Name: yyT116575 Date: 12/21/2000
java version "1.2.2"
Classic VM (build JDK-1.2.2_005, native threads, symcjit)
/*
This applet will cease to respond to input when the applet is reloaded
while a modal dialog is displayed.
To duplicate:
1) Run the applet in a browser (I tested on IE 4.72 and Netscape 4.61
with Java Plugin 1.2.2.p005 and IE 5.0 with Java Plugin 1.3.0-C all three
on Windows NT 4.0)
2) Click the "open win" button. This should open two windows, a frame and a
dialog which is modal to the frame.
3) Click reload on the browser.
4) At this point the windows will disappear and the applet will reload, but you
are not able to click on the "open win" button. If you can still click the
"open win" button, try following the 3 steps again. Sometimes, I had to go
through the steps twice to get the problem to happen.
5) At this point you should be unable to click the "open win" button.
Under IE
If you close IE, you will get a message saying either "ActiveX control busy,
do you want to close?" and then a "this application has crash" dialog or
just a "this application has crashed" dialog.
Under Netscape
Netscape exhibits the same behavior as IE (ie, you are unable to click on
the "open win" button), but will close cleanly.
Under IE 5.50 with plug-in 1.3.0_01
If you click reload button after "Open win" been loaded, the IE won't respond
to that event, and make the IE freezes. If you close the modal dialogue and
click on reload, everything works fine.
Under Netscape 6 with plug-in 1.3.0_01
Reload button dosen't reload the applet if there is a modal dialogue open,
which is the expect behavior.
Under Netscape 4.73 with plug-in 1.3.0_01
The applet cannot be loaded, and throw a AccessControlException.
*/
import javax.swing.*;
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
public class Foo extends JApplet implements ActionListener {
private AFrame aFrame;
public void init(){
System.out.println(" CALLED " + "Init!");
JButton myBut = new JButton("open win");
myBut.addActionListener(this);
getContentPane().add(myBut);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
aFrame = new AFrame();
aFrame.setVisible(true);
aFrame.showDialog();
}
public class AFrame extends JFrame
{
private ADialog aDialog;
public AFrame() {
setSize(100, 100);
getContentPane().add(new JTextArea("foobarack", 5, 30));
}
public void showDialog() {
aDialog = new ADialog(this, true);
aDialog.show();
}
public void dispose() {
super.dispose();
}
public class ADialog extends JDialog
{
public ADialog(Frame parent, boolean modalFlag) {
super(parent, modalFlag);
setSize(100, 100);
getContentPane().add(new JButton("foobar"));
}
}
}
public void destroy(){
if (aFrame != null) {
aFrame.dispose();
}
}
public void start(){
System.out.println(" CALLED " + "start!");
}
public void stop(){
System.out.println(" CALLED " + "Stop!");
}
}
(Review ID: 107754)
======================================================================
- backported by
-
JDK-2039475 Reloading browser while modal dialogs are displayed freezes applet
-
- Resolved
-