JInternalFrame[] frames = desktop.getAllFrames();
MyInternalFrame[] frames = (MyInternalFrame[])desktop.getAllFrames();   int index = desktop.getIndexOf(targetSession); System.out.println("session found and closing down " + index); targetSession.removeSessionListener(this); targetSession.removeSessionJumpListener(this);  desktop.remove(index);
   public void removeSessionView(Session targetSession) {      JInternalFrame[] frames = desktop.getAllFrames();   }