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

Label doesn't display in applet

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Future Project
    • Icon: P3 P3
    • 7-pool
    • 6u1
    • deploy
    • None
    • sparc
    • solaris_10

      The following trivial applet fails to display the label:

      AppletTest.html:
      -----
      <applet codebase="." code="AppletTest" width="400" height="200"></applet>
      -----

      AppletTest.java:
      -----
      import java.applet.*;
      import java.awt.*;

      public class AppletTest extends Applet {
          public void init() {
              setLayout(new BorderLayout());
              add(new Label("test"), BorderLayout.CENTER);
          }
      }

      I've tried many variants such as

          add("Center", new Label("test"));

      and not setting the layout and using the default layout with

          add(new Label("test"));

      None of them display. They all work if I use JDK 1.5.

      I also tried with the (not yet released) JDK 1.6.0_02, which also fails.

      I'm using firefox with the Java plugin (version verified using about:plugins).

            igor Igor Nekrestyanov (Inactive)
            bshannon Bill Shannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: