frames[index].setTitle(d);
frames[index].setTitle(frames[index].getTitle() + " " + d);
                  public void run() {                     JInternalFrame[] frames = desktop.getAllFrames();                     frames[index].setTitle(d);                  }