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

When loading an applet with JVM 1.5 the first time, it steals window focus

XMLWordPrintable

    • b33
    • x86
    • windows_xp

        A customer reported a problem with JDK1.5 applet/plugin on MS-windows
        platform --
        when you load as applet page (which refresh itself say every 5 secs),
        then you put a window on top (eg outllook express),
        when the applet reload the next time, it would steal the focus (the
        browser becomes on top of
        the outlook express). This only happens for the first time, when you
        put the outlook express
        window back on top, the browser doesn't pop back up even the applet
        continues to refresh.

        This problem looks similiar to 2120929 & 4984794, but this problem
        still exist in a nightly build with those bugs fixed
        (/net/dig-dug.east/bigtmp/deployment/1.5.0_03/nightly/2005-02-11).
        Therefore a new bug is filed.
        This is radiance case #64454762 and apollo escalation #1-6941598.
        Customer is Lehman Brothers.

        To reproduce:
        * install JDK1.5 plugin to a browser (eg. mozilla firefox or IE)
        * open a window (such as outlook express or command prompt)
        * load http://pts-americas.west/to/pts-java/applet/TestHello.html
        * immediately bring up the other app window on top of the browser window
        * when the applet refresh itself the next time, it will bring the
        browser window on top
        * this focus changing behaviour won't happen again if you bring the
        other window back on top


        HelloWorld.java
        ===============

        import java.applet.*;
        import java.awt.*;

        public class HelloWorld extends Applet
        {
            public void paint(Graphics g)
            {
        g.drawString("Hello world!", 50, 25);
            }
        }



        TestHello.html
        ==============

        <HTML>
        <HEAD>
        <meta http-equiv="refresh" content="5;url=TestHello.html">
        <TITLE>The Hello Applet</TITLE>
        </HEAD>
        <BODY>
        <P>This is an applet </P>
        <EMBED type="application/x-java-applet;version=1.5">
        <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=50>
        </APPLET>
        </EMBED>
        <P>Bye</P>
        </BODY>
        </HTML>


        ###@###.### 2005-2-19 01:01:50 GMT
        ###@###.### 2005-2-22 23:11:18 GMT

              ant Anton Tarasov (Inactive)
              lkchow Lawrence Chow
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: