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

"warning: applet window" doubles itself and displays message in the extra area

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.1.6
    • client-libs
    • sparc
    • solaris_2.6

      When bring up an applet window from appletviewer through a web server, 2 areas shows up side by side - one with the yellow "Warning: applet window" bar and the message string shows in the area on the right.

      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>

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: