System.out.println("session found and closing down " + index);
log.info("session found and closing down " + index);
   public void removeSessionView(Session targetSession) {      if (hideTabBar && sessionPane.getTabCount() == 0) {         for (int x=0; x < getContentPane().getComponentCount(); x++) {            if (getContentPane().getComponent(x) instanceof Session) {               getContentPane().remove(x);            }         }      }      else {         int index = sessionPane.indexOfComponent(targetSession);         System.out.println("session found and closing down " + index);         targetSession.removeSessionListener(this);         targetSession.removeSessionJumpListener(this);         int tabs = sessionPane.getTabCount();         sessionPane.remove(index);         tabs--;         if (index < tabs) {            sessionPane.setSelectedIndex(index);            sessionPane.setForegroundAt(index,Color.blue);            sessionPane.setIconAt(index,focused);            ((Session)sessionPane.getComponentAt(index)).requestFocus();         }         else {            if (tabs > 0) {               sessionPane.setSelectedIndex(0);               sessionPane.setForegroundAt(0,Color.blue);               sessionPane.setIconAt(0,focused);               ((Session)sessionPane.getComponentAt(0)).requestFocus();            }         }      }   }