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

The ImageIcon.loadImage() method wait only 5 seconds.

    XMLWordPrintable

Details

    Description



      Name: aaC67449 Date: 09/16/99



      The ImageIcon.loadImage() method wait only 5 seconds for the image to load
      So it's can returns before the image is completely loaded.
      but the javadoc says:"

        /**
           * Wait for the image to load
           */
          protected void loadImage(Image image) "

      "

      So the code should be updated to meet the javadoc.


      See the code:"
           /**
           * Wait for the image to load
           */
          protected void loadImage(Image image) {
      synchronized(tracker) {
      tracker.addImage(image, 0);
      try {
      tracker.waitForID(0, 5000); // <---- wait only 5 seconds
      } catch (InterruptedException e) {
      System.out.println("INTERRUPTED while loading Image");
      }
                  loadStatus = tracker.statusID(0, false);
      tracker.removeImage(image, 0);

      width = image.getWidth(imageObserver);
      height = image.getHeight(imageObserver);
      }
          }


      ".

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              jeff Jeff Dinkins
              alisunw Ali Ali (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: