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

Repaint problem in Plugin1.4 when is applet is covered/uncovered by other appln.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • deploy
    • x86
    • windows_nt



      Name: yyT116575 Date: 10/23/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)


      PROBLEM DESCRIPTION:
         When the applet is covered & uncovered by other Application or another
      Browser window,the repaint of the Applet is not proper.

      STEPS TO REPRODUCE THE PROBLEM:
         Load the applet in a Browser window.
         Cover & uncover the applet by another Browser window or Application.
         The Repaint is not proper.

      JAVA SOURCE CODE:
         JavaJS.java====================
      import java.applet.*;
      import java.awt.*;
      import java.awt.event.*;
      import netscape.javascript.JSObject;
      import javax.swing.*;


      public class JavaJS extends Applet {

        TextField text;
        Button b;
        Frame frame;
        Label l;

        public void init(){
          b=new Button("JavaToJS");
          add(b);
          b.addActionListener(new ButtonAction());
       }

        public class ButtonAction implements ActionListener{
          public void actionPerformed(ActionEvent e){
            JSObject o = (JSObject)JSObject.getWindow(JavaJS.this);
            if(o!=null)
              o.call("hello", null);
            else
              System.out.println("Unable to get the JSObject(Browser Window)");
          }
        }
      }

         JavaJS.htm=========================
      <html>
      <head>
      </head>
      <script>
        function hello() {
          alert ("Java to JS Communication Successful");
        }
      </script>

      <body>
      <center>
      <!-- Uncomment the following tag for loading the Applet in IE with Plugin -->
      <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
              id="cim" WIDTH=190 HEIGHT=190 codebase="." name="JavaJS">
      <PARAM NAME=CODE VALUE="JavaJS.class">
      <PARAM NAME=MAYSCRIPT VALUE=TRUE>
      <PARAM NAME=SCRIPTABLE VALUE=TRUE>
      </OBJECT>

      </center>
      </body>

      </html>
      (Review ID: 134274)
      ======================================================================

            mafishersunw Margarita Fisher (Inactive)
            yyoungsunw Yung-ching Young (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: