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

JDesktopPane.getAllFramesInLayer returns incorrect value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.0
    • client-libs



      Name: dbT83986 Date: 01/10/99


      JDesktopPane.getAllFramesInLayer returns an incorrect value
      when some JInternalFrame in the layer is iconified. The
      source that causes the error is the following method in
      JDesktopPane:

      public JInternalFrame[] getAllFramesInLayer(int layer) {
              int i, count;
              JInternalFrame[] results;
              Vector vResults = new Vector(10);
              Object next, tmp;

              count = getComponentCount();
              for(i = 0; i < count; i++) {
                  next = getComponent(i);
                  if(next instanceof JInternalFrame)
        // Missing enclosing brackets for correct code block
                      if(((JInternalFrame)next).getLayer() == layer)
                          vResults.addElement(next);
                  else if(next instanceof JInternalFrame.JDesktopIcon) {
                      tmp = ((JInternalFrame.JDesktopIcon)next).getInternalFrame();
                      if(tmp != null && ((JInternalFrame)tmp).getLayer() == layer)
                          vResults.addElement(tmp);
                  }
              }

              results = new JInternalFrame[vResults.size()];
              vResults.copyInto(results);

              return results;
          }
      (Review ID: 52357)
      ======================================================================

            hgajewsksunw Hania Gajewska (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: