0 Replies Latest reply: Jan 27, 2011 4:45 AM by 834352 RSS

    Modal dialogs have plug-in dependent behavior, applet in IE.


      I have an applet within a html page. The applet should have some modal dialogs however the behavior of these dialogs seems to have changed with java versions. The modal dialogs worked as expected in previous versions e.g. 1.6.0_18 however in 1.6.0_22 and 1.6.0_23 they are no longer modal (it is for instance possible to click home or links such that the page is changed and the modal dialog is ignored).
      If I disable the 'Enable the next-generation Java Plug-in' in Java advanced settings the dialogs act modal again (nothing in the IE can be clicked).

      Does anyone know if my perception of modal dialogs is different from Javas? Should it be possible to click links without having to answer the dialog first in the newest Java updates? Is there another approach that can make dialogs entirely modal in newest Java versions with sun.plugin2 in IE? This is a must for our project.
      Any help is indeed welcome.

      System info:
      I currently use java version 1.6.0_22
      IE 7 (Version 7.0.5730.11CO)
      OS Microsoft Windows XP Professional.

      I have inserted a brief code example below, of how I launch an applet from the html file.
      I have not supplied the Java code as it is a quite large example, but I test JDialogs, and Dialogs as toolkit, application and document modal (all with similar results). A method for how to find the parent Frame, which is used as owner for the dialogs is however inserted.

      The 'Go to Google' link can be clicked even though a modal dialog is open, this is not what I would expect and not compatible with previous versions.
      Other areas can also be clicked, but the focus is returned to the dialog. Which seems like a bad solution for our project since single click actions are suffiecent to mess things up.

      I have also tried with <Applet> tags in the html, with no difference.

        width="200" height="200">
        <PARAM NAME="CODETYPE" VALUE="application/java"/>
        <PARAM name="code" value="MainApplet.class">
      <a href="http://www.google.com">Go to Google</a> 
      How I find the dialog owner frame:
      private Frame getParentFrame() {
              Container parent = getParent();
              while (!(parent instanceof Frame)) {
                  parent = ((Component)parent).getParent();
              return (Frame)parent;
      Thank you.