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

tiny sample applet deadlocks on start-up

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      x86
    • OS:
      windows_nt
    • Verification:
      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: