setTitle();
setSessionTitle();
   public void onSessionChanged(SessionChangeEvent changeEvent) {      Session ses = (Session)changeEvent.getSource();      switch (changeEvent.getState()) {         case STATE_CONNECTED:            final String d = ses.getAllocDeviceName();            if (d != null) {               System.out.println(changeEvent.getState() + " " + d);               final int index = sessionPane.indexOfComponent(ses);               if (index >= 0) {                  Runnable tc = new Runnable () {                     public void run() {                        sessionPane.setTitleAt(index,d);                     }                  };                  SwingUtilities.invokeLater(tc);               }               setTitle();            }            break;      }   }