Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2039349 | 1.4.0 | Devananda Jayaraman | P3 | Resolved | Fixed | beta |
Name: yyT116575 Date: 12/15/2000
Java(TM) Plug-in: Version 1.3.0_01
Anv?nder JRE-version 1.3.0_01 Java HotSpot(TM) Client VM
I have problem with modal dialogs in a JApplet. The dialog
loose focus when I click on the parent applet. Then the dialog
disappear behind Internet Explorer.
I run Java(TM) Plug-in: Version 1.3.0_01 on Internet Explorer Ver.5.50 and
Windows 2000 Professional.
This example will show the problem.
<html>
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="300" height="300" align="baseline"
codebase="http://java.sun.com/products/plugin/1.3.0_01/jinstall-130_01-win32.cab#Version=1,3,0,1">
<PARAM NAME="code" VALUE="ModalApplet.class">
<PARAM NAME="codebase" VALUE="./">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.0_01">
<PARAM NAME="model" VALUE="models/HyaluronicAcid.xyz">
<PARAM NAME="scriptable" VALUE="true">
No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
</OBJECT>
</body>
</html>
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class ModalApplet extends JApplet {
public void init() {
getContentPane().setLayout(new FlowLayout());
JButton b1 = new JButton("Show dialog");
getContentPane().add(b1);
b1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JDialog dialog = new ModalDialog();
dialog.setLocationRelativeTo(ModalApplet.this);
dialog.setVisible(true);
}});
}
protected class ModalDialog extends JDialog {
public ModalDialog() {
super((Frame)null, "Modal Dialog", true);
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
getContentPane().setLayout(new FlowLayout());
JButton buttonClose = new JButton("Close");
getContentPane().add(buttonClose);
buttonClose.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dispose();
}});
setSize(200,200);
}
}
}
regards
Jonas
(Review ID: 113863)
======================================================================
- backported by
-
JDK-2039349 JApplet. Modal JDialogs loose focus in IE5
-
- Resolved
-
- duplicates
-
JDK-4410828 Plugin authentication dialog easily lost behind other windows
-
- Closed
-