Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5044749

Applet resizing using JavaScript blocks with Java-Plugin 1.4.2_04

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.2
    • deploy
    • x86
    • windows_xp



      Name: gm110360 Date: 05/10/2004


      FULL PRODUCT VERSION :
      Plugin-Info:
      Java 2 Runtime Environment, Standard Edition 1.4.2_04
      Standardversion der virtuellen Maschiene 1.4.2_04-b05
      Java Plugin 1.4.2_04


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      IE Version6 .0.2800.1106.xpsp2.030422-1633
      IE Update Versions: SP1, Q832894; Q330994;

      A DESCRIPTION OF THE PROBLEM :
      Resizing an applet using JavaScript causes IE to freeze for up to 10 seconds. This problem only apears in JavaPlugin 1.4 2_04 with IE 6. On Mozilla Firefox 0.8 the applet is running fine. With JavaPlugin 1.4.2_03, 1.4.1_02, 1.3.1_08, 1.3.1_05 resizing works fine in both browsers.

      I think, there is a problem in the communication JavaScript to Java, because if I call some dummyMethod which only prints out some trace messages, the same problem occurs.

      See the section "Source Code"

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :

      1) create and compile the applet
      2) create applet page an place it into the same folder like compiled applet 3) class
      4) show the page in IE
      5) resize the browser window.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Reizing without freezing the browser window.
      ACTUAL -
      Sometimes resizing is possible, but very offten the Browser is not reponding for up to 10 seconds, while the CPU load is 100%.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      There are no error messages in the console.

      REPRODUCIBILITY :
      This bug can be reproduced often.

      ---------- BEGIN SOURCE ----------
      Applet code:

      import java.applet.Applet;
      import java.awt.Color;

      public class DemoApplet extends Applet {

      public void init() {
      this.setBackground(Color.red);
      this.setLayout(null);
      }

      /**
      * @see java.awt.Component#setSize(int, int)
      */
      public void setSize(int width, int height) {
      System.out.println("DemoApplet.setSize() entered.");
      System.out.println("DemoApplet.setSize(): width=" + width + ", height=" + height);
      super.setSize(width, height);
      System.out.println("DemoApplet.setSize() left.");
      }

      public void dummyMethod(int arg0, int arg1) {
      System.out.println("DemoApplet.dummyMethod() entered.");
      System.out.println("DemoApplet.setSize(): arg0=" + arg0 + ", arg1=" + arg1);
      System.out.println("DemoApplet.dummyMethod() left.");
      }
      }

      HTML-Page:

      <html>
      <head>
      <meta NAME="Copyright" CONTENT="Copyright Credit Suisse - all rights reserved">
      <title> CSFS Intranet Directories: Business Chart of CSFS</title>

      <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
      function resize(){
      document.DemoApplet.setSize(document.body.clientWidth, document.body.clientHeight);
      }
      </SCRIPT>
        
      </head>

      <body onResize="resize()" onLoad="resize()" onUnload="closeDependentWindows()" topmargin="0" leftmargin="0" marginwidth="0"
      marginheight="0" bgcolor="#FFFFFF" text="#202020" link="#768BC2" vlink="#768BC2"
      alink="#DF103F">

      <APPLET CODE = "DemoApplet.class"
              CODEBASE = "."
              WIDTH ="100%"
              HEIGHT="100%"
              NAME = "DemoApplet"
              MAYSCRIPT>
      </APPLET>

      </body>
      </html>


      ---------- END SOURCE ----------
      (Incident Review ID: 261070)
      ======================================================================

            zgu Zhengyu Gu
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: