log.debug(" num of frames before removal " + myFrameList.size());
   public void removeSessionView(Session targetSession) {      int index = getIndexOfSession(targetSession);      MyInternalFrame nextMIF = getNextInternalFrame();      System.out.println("session found and closing down " + index);      targetSession.removeSessionListener(this);      targetSession.removeSessionJumpListener(this);      JInternalFrame[] frames = (JInternalFrame[])desktop.getAllFrames();      MyInternalFrame mif = (MyInternalFrame)frames[index];      int count = getSessionViewCount();//      System.out.println(" num of frames before removal " + myFrameList.size());      myFrameList.remove(mif);//      System.out.println(" num of frames left " + myFrameList.size());      desktop.remove(index);      if (nextMIF != null) {         try {            nextMIF.setSelected(true);         }         catch (java.beans.PropertyVetoException e) {            System.out.println(e.getMessage());         }      }      this.repaint();   }