selectedIndex = desktop.getComponentCount();
   public void addSessionView(String tabText,Session session) {      MyInternalFrame frame = new MyInternalFrame();      frame.setVisible(true);      desktop.add(frame);      frame.setContentPane(session);      try {         frame.setSelected(true);      } catch (java.beans.PropertyVetoException e) {}      session.addSessionListener(this);      session.addSessionJumpListener(this);   }