Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4195142
Votes 13
Synopsis Not able to create a modal dialog box from JApplet
Category java_plugin:plugin
Reported Against 1.1 , bdk_1.0_nov_97
Release Fixed
State 11-Closed, duplicate of 4139692, bug
Priority: 4-Low
Related Bugs 4136481 , 4139692
Submit Date 04-DEC-1998
Description




Create a JApplet class. Create a JInternalFrame  customer 
and Create a JOptionPane  customer  by passing Jinternal
Frame  customer  as a parent component. I am able to access
JInteranlframe very well. I am able to iconify the
Jinternal frame easily without any problem. This
defeats the purpose of modalness.

SourceCode:
package imp.client_ui_error;

import com.sun.java.swing.*;
import com.sun.java.swing.event.*;
import com.sun.java.swing.text.*;
import java.awt.*;
import java.awt.event.*;


public class TestApplet extends JApplet
{
	
	public JInternalFrame testFrame;
	public TestApplet()
	{
	}
	
	
	public void init()
	{
       	
		testFrame = new JInternalFrame("TestFrame", true,true, true,true);
		testFrame.setPreferredSize(new Dimension(this.getSize().width-20,this.getSize().height -120));
		testFrame.pack();
		testFrame.show();
		this.getLayeredPane().add(testFrame,"Center");

		//Creates a message modal dialog 

		testFrame.addMouseListener(new MouseAdapter()
		{
			public void mouseClicked(MouseEvent e)
			{
				JOptionPane.showMessageDialog(testFrame,
                                    "Eggs aren't supposed to be green.",
                                    "A plain message",
                                    JOptionPane.PLAIN_MESSAGE);
			}
		});

	}

		


}

HTML SOURCE:

<html>
<head>
<title>TestApplet</title>
</head>
<body>



<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
	WIDTH = 800 HEIGHT = 400  codebase="http://java.sun.com/products/plugin/1.1.1/jinstall-111-win32.cab#Version=1,1,1,0
	">

	<PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    <PARAM NAME="code" VALUE="imp.client_ui_error.TestApplet.class">
	<PARAM NAME="codebase" VALUE=".">
	<PARAM NAME = "gateway_url" VALUE = "http://itdw1060/imptest/">
	<PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    <COMMENT>
        <EMBED type="application/x-java-applet;version=1.1" width="600"
          height="800" align="baseline" code="imp.client_ui_error.TestApplet.class" 
		  CODEBASE="." 
		  pluginspage="http://java.sun.com/products/plugin/1.1/plugin-install.html">
		  		  
        <NOEMBED>
        </COMMENT>
              No JDK 1.1 support for APPLET!!
        </NOEMBED></EMBED>
    </OBJECT>



</body>
</html>
(Review ID: 39268)
======================================================================
Work Around
N/A
Evaluation
This is a duplicate of 4139692.

  xxxxx@xxxxx   2000-08-19
Comments
  
  Include a link with my name & email   

Submitted On 27-JUL-2000
E-Moorthi
Yes I do have similar problem....
When I test with Applet viewer the modal dialog comes up.
But they are not modal, when the applet loaded in browser.



PLEASE NOTE: JDK6 is formerly known as Project Mustang