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

IFrame in Applet flickers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.2_10
    • 1.4.2_07
    • deploy
    • None

        OS: Windows XP
        Service Pack 2
        Processor 1.5 GB 599 MHz, 992 MB RAM.
        Installed JDK: j2sdk1.4.2_07

        To compile:

        1. Install the JDK1.4 and ensure the bin folder is in the system path
        2. javac -classpath . TestApplet.java

        To test:

        1. Double-click on the index.html file to open in IE
        2. Scroll down in the iframe and you'll see the flickering

        -------------------
        TestApplet.java
        -------------------
        import java.awt.*;
        import java.awt.event.*;
        import javax.swing.*;

        public class TestApplet extends JApplet
        implements ActionListener
        {
          public void start()
          {
            getContentPane().setBackground(Color.blue);
            getContentPane().setLayout(new BorderLayout());
            JButton b = new JButton("Do Nothing");
            b.addActionListener(this);
            getContentPane().add(b, BorderLayout.CENTER);
          }

          public void update()
          {
            System.out.println("Update");
          }

          public void actionPerformed(ActionEvent event)
          {
            System.out.println("Click");
          }
        }

        -------------------
        index.html
        -------------------
        <html>
          <head>
            <title>TestApplet</title>
          </head>

          <body>
            <object
              classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
              codebase="j2re-1_4_2_03-windows-i586-p.exe#Version=1,4,2,3"
              id="Desktop"
              style="position:absolute; left:0; top:0; width:300; height:300; visibility:visible"
              hspace="0"
              vspace="0">

              <param name="code" value="TestApplet.class">
              <param name="codebase" value=".">
              <param name="type" value="application/x-java-applet;version=1.3">
              <param name="scriptable" value="true">
              <param name="mayscript" value="true">
        </object>

        <iframe id="Layer1" name="Layer1" style="position:absolute; left:210; top:10; width:280; height:280; visibility:visible;"
        frameborder="no" scrolling="auto" src="http://www.msn.com" application="yes">
        </iframe>

          </body>
        </html>

        ###@###.### 2005-04-13 03:05:02 GMT

              elousunw Edmund Lou (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: