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

tiny sample applet deadlocks on start-up

    XMLWordPrintable

Details

    • b01
    • x86
    • windows_nt
    • Not verified

    Description

      any applet has a reasonable chance of deadlocking on startup... but
      the applet shown below repros the problem quite often with appletviewer_g:

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

      class Foo extends Canvas
      {
          public void paint(Graphics g)
          {
              for (int i = 0; i < 255; i += 2)
              {
                  g.setColor(new Color(i, 0, 0));
                  g.drawString("this is a test of foo", i, i);
              }
          }

          public Dimension getPreferredSize()
          {
              return new Dimension(100, 100);
          }

          public Dimension getMinimumSize()
          {
              return getPreferredSize();
          }
      }

      public class test extends Applet
      {
          public void init()
          {
              setLayout(new FlowLayout());
              add(new Foo());
              add(new Foo());
              add(new Foo());
          }
      }

      Attachments

        Activity

          People

            jlockesunw Jonathan Locke (Inactive)
            jlockesunw Jonathan Locke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: