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

1.1.only applet warning window doubles itself and string message shows in the ex

    XMLWordPrintable

Details

    • sparc
    • solaris_2.6

    Description

      When bring up an applet window from appletviewer through a web server, the window doubles itself with two areas show up side by side - left one with the yellow "Warning: Applet Window" bar and right one with the string message. Test case includes TestWindow.java and test.html.

      /* TestWindow.java */
      import java.awt.*;
      import java.applet.*;

      public class TestWindow extends Applet
      {

         Window w;
         Frame f;

         public void init()
         {
            f = new Frame("this is a frame");
            w = new myWindow(f);
            w.setLocation(300, 200);
            w.setSize(300,100);
            w.setVisible(true);
         }
         public class myWindow extends Window
         {
            myWindow(Frame parent)
            {
               super(parent);
            }
            public void paint(Graphics g)
            {
               g.drawString("this is a window with a warning message", 20, 30);
            }
         }
      }

      test.html -

      <HTML>
      <HEAD>
      <TITLE>Testing Window</TITLE>
      </HEAD>
      <BODY BGCOLOR="#000066" TEXT="#FFFFFF" link="aqua" vlink="lime">
      <CENTER>
      Testing Window<P>
      <hr>
      <applet code=TestWindow.class width=200 height=200>
      </applet>
      <hr>

      Attachments

        Issue Links

          Activity

            People

              bchristi Brent Christian
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: